roll-ai commited on
Commit
0c26a19
·
verified ·
1 Parent(s): cd58d9f

Update Dockerfile

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