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

Update Dockerfile

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