Julien Blanchon
commited on
Commit
·
ef87329
1
Parent(s):
bf1a542
Update
Browse files- .dockerignore +0 -46
- Dockerfile +0 -73
- README.md +1 -1
- pyproject.docker.toml +0 -42
- pyproject.toml +1 -1
- requirements.txt +3 -4
- uv.docker.lock +0 -0
- uv.lock +4 -4
.dockerignore
DELETED
|
@@ -1,46 +0,0 @@
|
|
| 1 |
-
# Git
|
| 2 |
-
.git
|
| 3 |
-
.gitignore
|
| 4 |
-
|
| 5 |
-
# Python
|
| 6 |
-
__pycache__
|
| 7 |
-
*.pyc
|
| 8 |
-
*.pyo
|
| 9 |
-
*.pyd
|
| 10 |
-
.Python
|
| 11 |
-
*.so
|
| 12 |
-
.pytest_cache
|
| 13 |
-
.coverage
|
| 14 |
-
|
| 15 |
-
# Virtual environments
|
| 16 |
-
.venv
|
| 17 |
-
.env
|
| 18 |
-
venv/
|
| 19 |
-
env/
|
| 20 |
-
|
| 21 |
-
# IDE
|
| 22 |
-
.vscode
|
| 23 |
-
.idea
|
| 24 |
-
*.swp
|
| 25 |
-
*.swo
|
| 26 |
-
|
| 27 |
-
# OS
|
| 28 |
-
.DS_Store
|
| 29 |
-
Thumbs.db
|
| 30 |
-
|
| 31 |
-
# Project specific
|
| 32 |
-
results/
|
| 33 |
-
temp_*
|
| 34 |
-
*.log
|
| 35 |
-
|
| 36 |
-
# Documentation
|
| 37 |
-
docs/
|
| 38 |
-
*.md
|
| 39 |
-
!README.md
|
| 40 |
-
|
| 41 |
-
# Assets (if large)
|
| 42 |
-
assets/images/
|
| 43 |
-
assets/fonts/
|
| 44 |
-
|
| 45 |
-
# GSplat documentation (not needed for runtime)
|
| 46 |
-
gsplat/src/gsplat/cuda/csrc/third_party/glm/doc/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dockerfile
DELETED
|
@@ -1,73 +0,0 @@
|
|
| 1 |
-
# Use NVIDIA CUDA image that matches PyTorch's CUDA 12.4 compilation
|
| 2 |
-
FROM nvidia/cuda:12.4.0-devel-ubuntu22.04
|
| 3 |
-
|
| 4 |
-
# Install Python 3.13 and dependencies with cache mounts
|
| 5 |
-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
| 6 |
-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
| 7 |
-
apt-get update && apt-get install -y \
|
| 8 |
-
software-properties-common && \
|
| 9 |
-
add-apt-repository ppa:deadsnakes/ppa && \
|
| 10 |
-
apt-get update && apt-get install -y \
|
| 11 |
-
python3.13 \
|
| 12 |
-
python3.13-venv \
|
| 13 |
-
python3.13-dev \
|
| 14 |
-
python3-pip \
|
| 15 |
-
git \
|
| 16 |
-
build-essential \
|
| 17 |
-
curl \
|
| 18 |
-
ninja-build \
|
| 19 |
-
wget
|
| 20 |
-
|
| 21 |
-
# Create symlinks for python
|
| 22 |
-
RUN ln -sf /usr/bin/python3.13 /usr/bin/python3 && \
|
| 23 |
-
ln -sf /usr/bin/python3.13 /usr/bin/python
|
| 24 |
-
|
| 25 |
-
# Set CUDA environment variables for runtime
|
| 26 |
-
ENV CUDA_HOME=/usr/local/cuda \
|
| 27 |
-
PATH=/usr/local/cuda/bin:$PATH \
|
| 28 |
-
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
|
| 29 |
-
|
| 30 |
-
# Install uv globally
|
| 31 |
-
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
| 32 |
-
|
| 33 |
-
# Set up user with ID 1000 (required for HF Spaces)
|
| 34 |
-
RUN useradd -m -u 1000 user
|
| 35 |
-
|
| 36 |
-
# Switch to user and set working directory
|
| 37 |
-
USER user
|
| 38 |
-
WORKDIR /home/user/app
|
| 39 |
-
|
| 40 |
-
# Set environment variables
|
| 41 |
-
ENV HOME=/home/user \
|
| 42 |
-
PATH=/home/user/.local/bin:$PATH \
|
| 43 |
-
PYTHONUNBUFFERED=1 \
|
| 44 |
-
GRADIO_SERVER_NAME=0.0.0.0 \
|
| 45 |
-
GRADIO_SERVER_PORT=7860 \
|
| 46 |
-
UV_CACHE_DIR=/home/user/.cache/uv
|
| 47 |
-
|
| 48 |
-
# Copy dependency files with exact versions
|
| 49 |
-
COPY --chown=user pyproject.docker.toml ./pyproject.toml
|
| 50 |
-
COPY --chown=user uv.docker.lock ./uv.lock
|
| 51 |
-
|
| 52 |
-
# Download pre-built wheels (built with PyTorch 2.6.0 + CUDA 12.4)
|
| 53 |
-
RUN mkdir -p wheels && \
|
| 54 |
-
wget -O wheels/gsplat-0.1.0-cp313-cp313-linux_x86_64.whl \
|
| 55 |
-
"https://huggingface.co/blanchon/image-gs-models-utils/resolve/main/gsplat-0.1.0-cp313-cp313-linux_x86_64.whl" && \
|
| 56 |
-
wget -O wheels/fused_ssim-0.0.1+b4fd832pt2.6.0cu124-cp313-cp313-linux_x86_64.whl \
|
| 57 |
-
"https://huggingface.co/blanchon/image-gs-models-utils/resolve/main/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-cp313-cp313-linux_x86_64.whl"
|
| 58 |
-
|
| 59 |
-
# Install dependencies with exact versions from lock file
|
| 60 |
-
RUN --mount=type=cache,target=/tmp/uv-cache,sharing=locked,uid=1000,gid=1000 \
|
| 61 |
-
UV_CACHE_DIR=/tmp/uv-cache uv sync --frozen --no-dev
|
| 62 |
-
|
| 63 |
-
# Copy the rest of the application
|
| 64 |
-
COPY --chown=user . .
|
| 65 |
-
|
| 66 |
-
# Ensure Docker-specific pyproject.toml is used at runtime
|
| 67 |
-
COPY --chown=user pyproject.docker.toml ./pyproject.toml
|
| 68 |
-
|
| 69 |
-
# Expose port 7860 (default for HF Spaces)
|
| 70 |
-
EXPOSE 7860
|
| 71 |
-
|
| 72 |
-
# Launch the Gradio app directly with venv python (no uv overhead)
|
| 73 |
-
CMD [".venv/bin/python", "gradio_app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
|
@@ -5,7 +5,7 @@ colorFrom: blue
|
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.0.0
|
| 8 |
-
python_version: "3.
|
| 9 |
app_file: gradio_app.py
|
| 10 |
suggested_hardware: "cpu-basic"
|
| 11 |
models:
|
|
|
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.0.0
|
| 8 |
+
python_version: "3.10"
|
| 9 |
app_file: gradio_app.py
|
| 10 |
suggested_hardware: "cpu-basic"
|
| 11 |
models:
|
pyproject.docker.toml
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
[project]
|
| 2 |
-
name = "image-gs"
|
| 3 |
-
version = "0.1.0"
|
| 4 |
-
description = "Add your description here"
|
| 5 |
-
readme = "README.md"
|
| 6 |
-
requires-python = ">=3.13"
|
| 7 |
-
dependencies = [
|
| 8 |
-
"lpips>=0.1.4",
|
| 9 |
-
"matplotlib>=3.10.6",
|
| 10 |
-
"numpy>=2.2.6",
|
| 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",
|
| 20 |
-
"gradio>=5.0.0",
|
| 21 |
-
"huggingface_hub>=0.24.0",
|
| 22 |
-
"spaces>=0.28.0",
|
| 23 |
-
]
|
| 24 |
-
|
| 25 |
-
# We use python 3.13 and cu124 with PyTorch 2.6.0
|
| 26 |
-
[tool.uv.sources]
|
| 27 |
-
fused_ssim = { path = "wheels/fused_ssim-0.0.1+b4fd832pt2.6.0cu124-cp313-cp313-linux_x86_64.whl" }
|
| 28 |
-
gsplat = { path = "wheels/gsplat-0.1.0-cp313-cp313-linux_x86_64.whl" }
|
| 29 |
-
torch = [{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" }]
|
| 30 |
-
torchvision = [{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" }]
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
[tool.uv.extra-build-dependencies]
|
| 34 |
-
fused-ssim = ["torch", "numpy"]
|
| 35 |
-
|
| 36 |
-
[[tool.uv.index]]
|
| 37 |
-
name = "pytorch-cu124"
|
| 38 |
-
url = "https://download.pytorch.org/whl/cu124"
|
| 39 |
-
explicit = true
|
| 40 |
-
|
| 41 |
-
[dependency-groups]
|
| 42 |
-
dev = ["huggingface-hub[cli]>=0.34.4"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pyproject.toml
CHANGED
|
@@ -24,7 +24,7 @@ dependencies = [
|
|
| 24 |
|
| 25 |
# We use python 3.10 and cu124
|
| 26 |
[tool.uv.sources]
|
| 27 |
-
fused_ssim = { url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-
|
| 28 |
gsplat = { path = "gsplat" }
|
| 29 |
torch = [{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" }]
|
| 30 |
torchvision = [{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" }]
|
|
|
|
| 24 |
|
| 25 |
# We use python 3.10 and cu124
|
| 26 |
[tool.uv.sources]
|
| 27 |
+
fused_ssim = { url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-cp310-cp310-linux_x86_64.whl" }
|
| 28 |
gsplat = { path = "gsplat" }
|
| 29 |
torch = [{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" }]
|
| 30 |
torchvision = [{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" }]
|
requirements.txt
CHANGED
|
@@ -17,9 +17,8 @@ torchvision==0.21.0
|
|
| 17 |
torchmetrics>=1.8.2
|
| 18 |
|
| 19 |
# Pre-built wheels from HuggingFace (PyTorch 2.6.0 + CUDA 12.4)
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
gsplat @ https://huggingface.co/blanchon/image-gs-models-utils/resolve/main/gsplat-0.1.0-cp313-cp313-linux_x86_64.whl
|
| 24 |
|
| 25 |
|
|
|
|
| 17 |
torchmetrics>=1.8.2
|
| 18 |
|
| 19 |
# Pre-built wheels from HuggingFace (PyTorch 2.6.0 + CUDA 12.4)
|
| 20 |
+
# Built for Python 3.10 (cp310) - compatible with HuggingFace Spaces Gradio SDK
|
| 21 |
+
fused_ssim @ https://huggingface.co/blanchon/image-gs-models-utils/resolve/main/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-cp310-cp310-linux_x86_64.whl
|
| 22 |
+
gsplat @ https://huggingface.co/blanchon/image-gs-models-utils/resolve/main/gsplat-0.1.0-cp310-cp310-linux_x86_64.whl
|
|
|
|
| 23 |
|
| 24 |
|
uv.docker.lock
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
uv.lock
CHANGED
|
@@ -548,9 +548,9 @@ wheels = [
|
|
| 548 |
[[package]]
|
| 549 |
name = "fused-ssim"
|
| 550 |
version = "0.0.1+b4fd832pt2.6.0cu124"
|
| 551 |
-
source = { url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-
|
| 552 |
wheels = [
|
| 553 |
-
{ url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-
|
| 554 |
]
|
| 555 |
|
| 556 |
[[package]]
|
|
@@ -774,8 +774,8 @@ dev = [
|
|
| 774 |
|
| 775 |
[package.metadata]
|
| 776 |
requires-dist = [
|
| 777 |
-
{ name = "fused-ssim", url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-
|
| 778 |
-
{ name = "gradio", specifier = ">=
|
| 779 |
{ name = "gsplat", directory = "gsplat" },
|
| 780 |
{ name = "huggingface-hub", specifier = ">=0.24.0" },
|
| 781 |
{ name = "lpips", specifier = ">=0.1.4" },
|
|
|
|
| 548 |
[[package]]
|
| 549 |
name = "fused-ssim"
|
| 550 |
version = "0.0.1+b4fd832pt2.6.0cu124"
|
| 551 |
+
source = { url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-cp310-cp310-linux_x86_64.whl" }
|
| 552 |
wheels = [
|
| 553 |
+
{ url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-cp310-cp310-linux_x86_64.whl", hash = "sha256:1abb8ff93bd0bcb3b74e2844d8dbe7c27ece6f84653b5fe1be7115e45c166d85" },
|
| 554 |
]
|
| 555 |
|
| 556 |
[[package]]
|
|
|
|
| 774 |
|
| 775 |
[package.metadata]
|
| 776 |
requires-dist = [
|
| 777 |
+
{ name = "fused-ssim", url = "https://github.com/MiroPsota/torch_packages_builder/releases/download/fused_ssim-0.0.1%2Bb4fd832/fused_ssim-0.0.1%2Bb4fd832pt2.6.0cu124-cp310-cp310-linux_x86_64.whl" },
|
| 778 |
+
{ name = "gradio", specifier = ">=5.0.0" },
|
| 779 |
{ name = "gsplat", directory = "gsplat" },
|
| 780 |
{ name = "huggingface-hub", specifier = ">=0.24.0" },
|
| 781 |
{ name = "lpips", specifier = ">=0.1.4" },
|