Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +46 -51
Dockerfile
CHANGED
@@ -1,53 +1,48 @@
|
|
1 |
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
#
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
#
|
18 |
-
|
19 |
-
#
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
#
|
26 |
-
#
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
#
|
38 |
-
#
|
39 |
-
#
|
40 |
-
|
41 |
-
|
42 |
-
#
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
#
|
48 |
-
|
49 |
-
|
50 |
-
# EXPOSE 7860
|
51 |
-
|
52 |
-
# # Start the app
|
53 |
-
# CMD ["python", "app.py"]
|
|
|
1 |
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
|
2 |
|
3 |
+
|
4 |
+
|
5 |
+
# Install OS-level dependencies
|
6 |
+
RUN apt-get update && apt-get install -y \
|
7 |
+
git ffmpeg curl \
|
8 |
+
libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev \
|
9 |
+
libavutil-dev libswscale-dev libswresample-dev \
|
10 |
+
&& apt-get clean
|
11 |
+
|
12 |
+
# Set working directory
|
13 |
+
WORKDIR /app
|
14 |
+
COPY . /app
|
15 |
+
RUN ls /app
|
16 |
+
# Create weights directory
|
17 |
+
# RUN mkdir -p /weights/FVSM /weights/OMSM /weights/output /weights/assets/manual_poses
|
18 |
+
|
19 |
+
# Install required Python packages
|
20 |
+
RUN pip install --upgrade pip
|
21 |
+
RUN pip install gdown
|
22 |
+
RUN pip install av huggingface_hub
|
23 |
+
RUN pip install -r requirements.txt
|
24 |
+
RUN pip install --no-binary :all: av # optional av re-install
|
25 |
+
# --------------------------
|
26 |
+
# Download ckpt weights from Hugging Face dataset (requires HF_TOKEN if private)
|
27 |
+
RUN python -c "\
|
28 |
+
from huggingface_hub import snapshot_download; \
|
29 |
+
snapshot_download(\
|
30 |
+
repo_id='roll-ai/FloVD-weights', \
|
31 |
+
repo_type='dataset', \
|
32 |
+
local_dir='/app/ckpt', \
|
33 |
+
allow_patterns='ckpt/**', \
|
34 |
+
use_auth_token=True\
|
35 |
+
)"
|
36 |
+
|
37 |
+
# --------------------------
|
38 |
+
# Download example camera pose
|
39 |
+
# --------------------------
|
40 |
+
RUN curl -L -o /weights/assets/manual_poses/example.txt https://huggingface.co/datasets/mutqa/FloVD-HF-Assets/resolve/main/example.txt
|
41 |
+
|
42 |
+
# Set permissions
|
43 |
+
RUN chmod -R 777 /app
|
44 |
+
|
45 |
+
EXPOSE 7860
|
46 |
+
|
47 |
+
# Start the app
|
48 |
+
CMD ["python", "app.py"]
|
|
|
|
|
|
|
|
|
|