Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +19 -19
Dockerfile
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
|
2 |
|
3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
git ffmpeg curl unzip \
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
8 |
&& apt-get clean
|
9 |
|
10 |
# Set working directory
|
11 |
WORKDIR /app
|
|
|
|
|
12 |
COPY . /app
|
13 |
-
RUN ls /app
|
14 |
|
15 |
-
#
|
16 |
RUN pip install --upgrade pip
|
17 |
-
RUN pip install gdown av huggingface_hub
|
18 |
RUN pip install -r requirements.txt
|
19 |
-
RUN pip install
|
20 |
-
|
21 |
-
# # Download ckpt weights from Hugging Face (private or public)
|
22 |
-
# RUN python -c "import os; from huggingface_hub import snapshot_download; snapshot_download( repo_id='roll-ai/FloVD-weights', repo_type='dataset', local_dir='/app/ckpt', allow_patterns='ckpt/**', token=os.getenv('HF_TOKEN'))"
|
23 |
-
|
24 |
-
|
25 |
-
# # Download example camera pose
|
26 |
-
# RUN mkdir -p /weights/assets/manual_poses
|
27 |
-
# RUN curl -L -o /weights/assets/manual_poses/example.txt https://huggingface.co/datasets/mutqa/FloVD-HF-Assets/resolve/main/example.txt
|
28 |
|
29 |
-
#
|
30 |
-
RUN
|
31 |
|
32 |
-
# Expose Gradio
|
33 |
EXPOSE 7860
|
34 |
|
35 |
-
#
|
36 |
CMD ["python", "app.py"]
|
|
|
1 |
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
|
2 |
|
3 |
+
# Set environment variable to control Hugging Face cache directory
|
4 |
+
ENV HF_HOME=/app/hf_cache
|
5 |
+
ENV TRANSFORMERS_CACHE=/app/hf_cache
|
6 |
+
ENV HF_TOKEN=${HF_TOKEN}
|
7 |
+
|
8 |
+
# Install system-level dependencies
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
git ffmpeg curl unzip \
|
11 |
+
libgl1-mesa-glx \
|
12 |
+
libglib2.0-0 \
|
13 |
+
libsm6 \
|
14 |
+
libxrender1 \
|
15 |
+
libxext6 \
|
16 |
&& apt-get clean
|
17 |
|
18 |
# Set working directory
|
19 |
WORKDIR /app
|
20 |
+
|
21 |
+
# Copy project files
|
22 |
COPY . /app
|
|
|
23 |
|
24 |
+
# Install Python dependencies
|
25 |
RUN pip install --upgrade pip
|
|
|
26 |
RUN pip install -r requirements.txt
|
27 |
+
RUN pip install av huggingface_hub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
+
# Reinstall av from source if needed
|
30 |
+
RUN pip install --no-binary :all: av
|
31 |
|
32 |
+
# Expose Gradio default port
|
33 |
EXPOSE 7860
|
34 |
|
35 |
+
# Run the app
|
36 |
CMD ["python", "app.py"]
|