Skip to content

Commit 685316b

Browse files
committed
Fix uv_init_torch
1 parent f821294 commit 685316b

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

uv/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ BASE_DIR=/ddiff-base/py\${PY_VERSION}-torch\${TORCH_VER}
6969
mkdir -p "\$BASE_DIR" && cd "\$BASE_DIR"
7070
uv venv --python "\${PY_VERSION}" --system-site-packages
7171
uv pip install --no-cache torch=="\${TORCH_VER}" torchvision=="\${VISION_VER}" torchaudio=="\${TORCH_VER}" --index-url "https://download.pytorch.org/whl/\${CUDA_VER}"
72-
echo "alias uv_init_torch\${TORCH_VER}='ln -sfn \${BASE_DIR}/.venv ./.venv && echo Created uv virtual environment with torch==\${TORCH_VER}'" >> ~/.bashrc
72+
echo "ln -sfn \${BASE_DIR}/.venv ./.venv && echo Created uv virtual environment with torch==\${TORCH_VER}" > /usr/local/bin/uv_init_torch\${TORCH_VER}
73+
chmod +x /usr/local/bin/uv_init_torch\${TORCH_VER}
7374
EOF
7475
RUN chmod +x /usr/local/bin/install_torch_env
7576

77+
ENV UV_NO_CACHE=1
78+
7679
# pytorch 2.4.1 (251209 Update)
7780
RUN install_torch_env 2.4.1 0.19.1 cu124
7881

uv/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ We provide a monolithic base image with various PyTorch versions and essential l
1616
### 1. Docker file example
1717

1818
```dockerfile
19-
FROM junwha/ddiff-base:cu12.4.1-py3.10-torch-251205
19+
FROM junwha/ddiff-base:cu12.4.1-py3.10-torch-251210
2020

2121
WORKDIR /<your workspace>
2222

2323
# 1. Initialize venv linked to a specific Torch version
2424
# (Note: This creates a symlink to the base image's venv, thus only one project per torch version is recommended)
25-
RUN uv_init_torch2.5.1
25+
RUN bash -c uv_init_torch2.5.1
2626

2727
# 2. Install additional packages (without torch)
2828
COPY pyproject.yaml /<your workspace>
29-
RUN uv pip install . --no-cache --no-install torch --no-install torchvision --no-install torchaudio
29+
RUN uv pip install --no-install torch --no-install torchvision --no-install torchaudio .
3030

3131
```
3232

@@ -48,7 +48,7 @@ you can use standard uv commands. The environment is automatically detected via
4848
* **Build Tools:** gcc-12 g++-12 ninja-build cmake build-essential
4949
* **Profiler:** Nsight System 2024
5050
## Releases
51-
**Image Tag:** `junwha/ddiff-base:cu12.4.1-py3.10-torch-251205`
51+
**Image Tag:** `junwha/ddiff-base:cu12.4.1-py3.10-torch-251210`
5252
* **Python:** 3.10
5353
* **Pre-installed PyTorch Versions:** 2.4.1, 2.5.1, 2.6.0, 2.7.1, 2.9.0
5454
* **Compute Capabilities**: 7.0 7.5 8.0 8.6 8.9 9.0+PTX

0 commit comments

Comments
 (0)