Julien Blanchon
commited on
Commit
·
5ff35c9
1
Parent(s):
7ef6474
Fix PyTorch version compatibility for gsplat wheel
Browse files- Pin PyTorch to exact version 2.6.0 and torchvision to 0.21.0 in Docker config
- Copy uv.lock to ensure exact dependency versions match local environment
- Use --frozen flag to prevent version drift during Docker build
- Rebuild and upload gsplat wheel with matching PyTorch 2.6.0+cu124
- This fixes undefined symbol errors from PyTorch version mismatches
- Dockerfile +9 -9
- pyproject.docker.toml +3 -3
Dockerfile
CHANGED
|
@@ -42,18 +42,18 @@ ENV HOME=/home/user \
|
|
| 42 |
GRADIO_SERVER_PORT=7860 \
|
| 43 |
UV_CACHE_DIR=/home/user/.cache/uv
|
| 44 |
|
| 45 |
-
# Copy dependency files
|
| 46 |
-
COPY --chown=user pyproject.toml ./pyproject.toml
|
| 47 |
-
COPY --chown=user
|
| 48 |
|
| 49 |
-
#
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
|
| 54 |
-
# Install dependencies
|
| 55 |
RUN --mount=type=cache,target=/tmp/uv-cache,sharing=locked,uid=1000,gid=1000 \
|
| 56 |
-
UV_CACHE_DIR=/tmp/uv-cache uv sync --no-dev
|
| 57 |
|
| 58 |
# Copy the rest of the application
|
| 59 |
COPY --chown=user . .
|
|
|
|
| 42 |
GRADIO_SERVER_PORT=7860 \
|
| 43 |
UV_CACHE_DIR=/home/user/.cache/uv
|
| 44 |
|
| 45 |
+
# Copy dependency files with exact versions
|
| 46 |
+
COPY --chown=user pyproject.docker.toml ./pyproject.toml
|
| 47 |
+
COPY --chown=user uv.lock ./uv.lock
|
| 48 |
|
| 49 |
+
# Download optimized gsplat wheel (built with same PyTorch version)
|
| 50 |
+
RUN mkdir -p wheels && \
|
| 51 |
+
wget -O wheels/gsplat-0.1.0-cp310-cp310-linux_x86_64.whl \
|
| 52 |
+
"https://huggingface.co/blanchon/image-gs-models-utils/resolve/main/gsplat-0.1.0-cp310-cp310-linux_x86_64.whl"
|
| 53 |
|
| 54 |
+
# Install dependencies with exact versions from lock file
|
| 55 |
RUN --mount=type=cache,target=/tmp/uv-cache,sharing=locked,uid=1000,gid=1000 \
|
| 56 |
+
UV_CACHE_DIR=/tmp/uv-cache uv sync --frozen --no-dev
|
| 57 |
|
| 58 |
# Copy the rest of the application
|
| 59 |
COPY --chown=user . .
|
pyproject.docker.toml
CHANGED
|
@@ -11,9 +11,9 @@ dependencies = [
|
|
| 11 |
"pytorch-msssim>=1.0.0",
|
| 12 |
"scikit-image>=0.25.2",
|
| 13 |
"scipy>=1.15.3",
|
| 14 |
-
"torch
|
| 15 |
"torchmetrics>=1.8.2",
|
| 16 |
-
"torchvision
|
| 17 |
"fused_ssim",
|
| 18 |
"pyyaml>=6.0.2",
|
| 19 |
"gsplat",
|
|
@@ -24,7 +24,7 @@ dependencies = [
|
|
| 24 |
# We use python 3.10 and cu124
|
| 25 |
[tool.uv.sources]
|
| 26 |
fused_ssim = { git = "https://github.com/rahul-goel/fused-ssim/" }
|
| 27 |
-
gsplat = { path = "gsplat" }
|
| 28 |
torch = [
|
| 29 |
{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" },
|
| 30 |
]
|
|
|
|
| 11 |
"pytorch-msssim>=1.0.0",
|
| 12 |
"scikit-image>=0.25.2",
|
| 13 |
"scipy>=1.15.3",
|
| 14 |
+
"torch==2.6.0",
|
| 15 |
"torchmetrics>=1.8.2",
|
| 16 |
+
"torchvision==0.21.0",
|
| 17 |
"fused_ssim",
|
| 18 |
"pyyaml>=6.0.2",
|
| 19 |
"gsplat",
|
|
|
|
| 24 |
# We use python 3.10 and cu124
|
| 25 |
[tool.uv.sources]
|
| 26 |
fused_ssim = { git = "https://github.com/rahul-goel/fused-ssim/" }
|
| 27 |
+
gsplat = { path = "wheels/gsplat-0.1.0-cp310-cp310-linux_x86_64.whl" }
|
| 28 |
torch = [
|
| 29 |
{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" },
|
| 30 |
]
|