Spaces:
Running
on
T4
Running
on
T4
Commit
·
5b2f23d
1
Parent(s):
5bca17b
docker
Browse files
Dockerfile
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM pytorch/pytorch:2.7.1-cuda12.6-cudnn9-devel
|
| 2 |
+
ENV CUDA_HOME=/usr/local/cuda
|
| 3 |
+
ENV PATH="${CUDA_HOME}/bin:${PATH}"
|
| 4 |
+
ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
|
| 5 |
+
ENV TORCH_CUDA_ARCH_LIST="7.5"
|
| 6 |
+
ENV USE_CUDA=1
|
| 7 |
+
|
| 8 |
+
# Verify CUDA setup
|
| 9 |
+
RUN nvcc --version && which nvcc
|
| 10 |
+
RUN apt-get update && apt-get install -y \
|
| 11 |
+
git fish tmux curl ffmpeg \
|
| 12 |
+
libgl1-mesa-glx libglib2.0-0 \
|
| 13 |
+
build-essential ninja-build python3.10-venv \
|
| 14 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
+
|
| 16 |
+
# Create non-root user
|
| 17 |
+
RUN useradd -m -u 1000 user
|
| 18 |
+
|
| 19 |
+
# Create HF cache with correct ownership
|
| 20 |
+
ENV HF_HOME=/home/user/.cache/huggingface
|
| 21 |
+
RUN mkdir -p $HF_HOME && chown -R user:user /home/user
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
ENV OMP_NUM_THREADS=1
|
| 25 |
+
ENV MKL_NUM_THREADS=1
|
| 26 |
+
ENV NUMEXPR_NUM_THREADS=1
|
| 27 |
+
|
| 28 |
+
# Switch to user before creating venv
|
| 29 |
+
USER user
|
| 30 |
+
WORKDIR /home/user/app
|
| 31 |
+
|
| 32 |
+
# Create virtualenv
|
| 33 |
+
RUN python3 -m venv /home/user/venv
|
| 34 |
+
ENV PATH="/home/user/venv/bin:$PATH"
|
| 35 |
+
|
| 36 |
+
# Dependencies
|
| 37 |
+
COPY --chown=user:user requirements.txt .
|
| 38 |
+
RUN pip install --upgrade pip && \
|
| 39 |
+
pip install --no-cache-dir -r requirements.txt
|
| 40 |
+
|
| 41 |
+
# Editable installs
|
| 42 |
+
RUN pip install --no-cache-dir -e ./src/video-sam2 && \
|
| 43 |
+
pip install --no-cache-dir --use-pep517 -e ./src/GroundingDINO && \
|
| 44 |
+
pip install --no-cache-dir -e ./src/LASER && \
|
| 45 |
+
pip install --no-cache-dir -e ./vine_hf
|
| 46 |
+
|
| 47 |
+
RUN cd src/GroundingDINO && \
|
| 48 |
+
python3 setup.py build_ext --force --inplace
|
| 49 |
+
|
| 50 |
+
# Copy app
|
| 51 |
+
COPY --chown=user:user . .
|
| 52 |
+
|
| 53 |
+
EXPOSE 7860
|
| 54 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 55 |
+
CMD ["python3", "app.py"]
|
vine_hf/__pycache__/flattening.cpython-310.pyc
CHANGED
|
Binary files a/vine_hf/__pycache__/flattening.cpython-310.pyc and b/vine_hf/__pycache__/flattening.cpython-310.pyc differ
|
|
|
vine_hf/__pycache__/vine_config.cpython-310.pyc
CHANGED
|
Binary files a/vine_hf/__pycache__/vine_config.cpython-310.pyc and b/vine_hf/__pycache__/vine_config.cpython-310.pyc differ
|
|
|
vine_hf/__pycache__/vine_model.cpython-310.pyc
CHANGED
|
Binary files a/vine_hf/__pycache__/vine_model.cpython-310.pyc and b/vine_hf/__pycache__/vine_model.cpython-310.pyc differ
|
|
|
vine_hf/__pycache__/vine_pipeline.cpython-310.pyc
CHANGED
|
Binary files a/vine_hf/__pycache__/vine_pipeline.cpython-310.pyc and b/vine_hf/__pycache__/vine_pipeline.cpython-310.pyc differ
|
|
|
vine_hf/__pycache__/vis_utils.cpython-310.pyc
CHANGED
|
Binary files a/vine_hf/__pycache__/vis_utils.cpython-310.pyc and b/vine_hf/__pycache__/vis_utils.cpython-310.pyc differ
|
|
|