summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs69
1 files changed, 67 insertions, 2 deletions
diff --git a/docs b/docs
index 698feb5..3a0b3cc 100644
--- a/docs
+++ b/docs
@@ -1,4 +1,42 @@
1# Rocky SSH Container 1# Rocky SSH Container
2## Setup
3### SSH Keys
4Place your SSH public keys in the `docker_build/ssh-keys/` directory:
5```bash
6cp ~/.ssh/id_ed25519.pub docker_build/ssh-keys/
7```
8The container will automatically add all `.pub` files from this directory to `/root/.ssh/authorized_keys`.
9
10## Building Containers
11### Base Development Container
12```bash
13# From the dev_env directory
14podman build -t rocky_dev:latest -f docker_build/Dockerfile .
15```
16### GPU-Enabled Container
17The GPU container builds on top of the base container using multi-stage build:
18```bash
19# First build the base container (from dev_env directory)
20podman build -t rocky_dev:latest -f docker_build/Dockerfile .
21# Then build the GPU version
22podman build -t rocky_dev_gpu:latest -f docker_build/Dockerfile.gpu .
23```
24
25## GPU Support
26The GPU-enabled container includes:
27- NVIDIA Container Toolkit for GPU access
28- GPU test script at `/usr/local/bin/gpu-test.sh`
29- Environment variables configured for NVIDIA GPU visibility
30- Workspace directory at `/workspace` for GPU workloads
31
32### Running with GPU Support
33```bash
34# Run GPU-enabled container
35podman run -it --device nvidia.com/gpu=all rocky_dev_gpu:latest
36# Test GPU inside container
37gpu-test.sh
38nvidia-smi
39```
2 40
3## Podman 41## Podman
4```bash 42```bash
@@ -18,6 +56,15 @@ kubectl delete pod rocky-dev-0
18kubectl scale statefulset rocky-dev --replicas=10 56kubectl scale statefulset rocky-dev --replicas=10
19kubectl delete -f rocky-ssh-deployment.yaml 57kubectl delete -f rocky-ssh-deployment.yaml
20``` 58```
59### Kubernetes GPU Deployment
60```bash
61kubectl apply -f rocky-ssh-gpu-deployment.yaml
62kubectl get pods -l app=rocky-dev-gpu -o wide
63kubectl describe pod rocky-dev-gpu-0 | grep nvidia
64kubectl exec -it rocky-dev-gpu-0 -- nvidia-smi
65kubectl scale statefulset rocky-dev-gpu --replicas=4
66kubectl delete -f rocky-ssh-gpu-deployment.yaml
67```
21 68
22## Local Registry 69## Local Registry
23```bash 70```bash
@@ -30,11 +77,29 @@ podman push localhost:5000/rocky_dev:latest --tls-verify=false
30```bash 77```bash
31# Direct shell 78# Direct shell
32kubectl exec -it rocky-dev-0 -- /bin/bash 79kubectl exec -it rocky-dev-0 -- /bin/bash
33
34# SSH with agent forwarding (2 terminals) 80# SSH with agent forwarding (2 terminals)
35kubectl port-forward rocky-dev-0 2222:22 81kubectl port-forward rocky-dev-0 2222:22
36ssh-agent bash -c 'ssh-add ~/macm4-resident && ssh -A -p 2222 root@localhost' 82ssh-agent bash -c 'ssh-add ~/macm4-resident && ssh -A -p 2222 root@localhost'
37
38# External 83# External
39kubectl port-forward --address 0.0.0.0 rocky-dev-0 9999:22 84kubectl port-forward --address 0.0.0.0 rocky-dev-0 9999:22
40``` 85```
86
87## Features
88### Development Tools
89- C/C++ development: gcc, gcc-c++, make, cmake
90- Python 3 with pip and development headers
91- Rust toolchain with cargo tools (cargo-edit, bacon, evcxr_jupyter)
92- Node.js v22 via nvm
93- Claude Code CLI tool
94
95### System Utilities
96- SSH server with key-based authentication
97- tmux, vim, nano editors
98- htop, bmon for system monitoring
99- git, wget, tree, bat
100- Network tools: nc, net-tools, wireguard-tools
101
102### GPU Computing (GPU version only)
103- NVIDIA GPU support via container toolkit
104- GPU test utilities
105- Dedicated /workspace directory for ML/GPU workloads