Skip to content

jalberty2018/run-pytorch-cuda-develop

Repository files navigation

Docker Image Version

run-pytorch-cuda-develop

Synopsis

A streamlined setup for developing on high-performance hardware.

  • Authentication credentials set via secrets for:
    • Code server authentication
    • Jupyterlab authentication
    • Hugging Face and CivitAI tokens for model access (mandatory).

Ensure that the required environment variables and secrets are correctly set before running the pod. See below for options.

Hardware provisioning

Software Repositories

Core

Setup

Component Version
OS Ubuntu 22.04 x86_64
Python 3.11.x
PyTorch 2.8.0
NVCC 12.9
Triton 3.x

Available Images

Base Images

ls250824/pytorch-cuda-ubuntu-develop

Docker Image Version

Custom Build:

docker pull ls250824/run-pytorch-cuda-develop:<version>

Connection options

Services

Service Port
Code Server 9000 (HTTP)
Jupyterlab 8888 (HTTP)
SSH/SCP 22 (TCP)
Gradio 7860 (HTTP)

Authentication Tokens

Token Environment Variable
Civitai CIVITAI_TOKEN
Huggingface HF_TOKEN
Code Server PASSWORD
Jupyterlab JUPYTERLAB_PASS

7z

Add directory to encrypted archive

7z a output.7z /workspace/output/

Extract directory from archive

7z x x.7z

CivitAI

civitai "<dowload link>" /workspace

Huggingface

huggingface-cli download model model_name.safetensors --local-dir /workspace
huggingface-cli upload model /workspace/model.safetensors

Apps

nvtop
htop
mc
nano
tmux
c++
nvcc
python
pip
ncdu
unzip

Building the Docker Image

build-docker.py script options

Option Description Default
--username Docker Hub username Current user
--tag Tag to use for the image Today's date
--latest If specified, also tags and pushes as latest Not enabled by default

Build & push Command

Run the following command to clone the repository and build the image:

git clone https://github.com/jalberty2018/run-pytorch-cuda-develop.git
cp run-pytorch-cuda-develop/build-docker.py ..

python3 build-docker.py \
--username=<your_dockerhub_username> \
--tag=<custom_tag> \ 
run-pytorch-cuda-develop

Note: If you want to push the image with the latest tag, add the --latest flag at the end.