Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +11 -11
Dockerfile
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
|
2 |
|
3 |
-
# Set
|
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 \
|
@@ -15,22 +14,23 @@ RUN apt-get update && apt-get install -y \
|
|
15 |
libxext6 \
|
16 |
&& apt-get clean
|
17 |
|
18 |
-
# Set working directory
|
19 |
WORKDIR /app
|
20 |
|
21 |
-
# Copy
|
22 |
COPY . /app
|
23 |
|
24 |
-
#
|
|
|
|
|
|
|
25 |
RUN pip install --upgrade pip
|
26 |
RUN pip install -r requirements.txt
|
27 |
RUN pip install av huggingface_hub
|
|
|
28 |
|
29 |
-
#
|
30 |
-
RUN pip install --no-binary :all: av
|
31 |
-
|
32 |
-
# Expose Gradio default port
|
33 |
EXPOSE 7860
|
34 |
|
35 |
-
#
|
36 |
CMD ["python", "app.py"]
|
|
|
1 |
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
|
2 |
|
3 |
+
# --- Set Hugging Face environment variables ---
|
4 |
ENV HF_HOME=/app/hf_cache
|
5 |
ENV TRANSFORMERS_CACHE=/app/hf_cache
|
|
|
6 |
|
7 |
+
# --- Install system-level dependencies ---
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
git ffmpeg curl unzip \
|
10 |
libgl1-mesa-glx \
|
|
|
14 |
libxext6 \
|
15 |
&& apt-get clean
|
16 |
|
17 |
+
# --- Set working directory ---
|
18 |
WORKDIR /app
|
19 |
|
20 |
+
# --- Copy all files ---
|
21 |
COPY . /app
|
22 |
|
23 |
+
# --- Create required cache/weights directories with permissions ---
|
24 |
+
RUN mkdir -p /app/hf_cache /app/ckpt && chmod -R 777 /app
|
25 |
+
|
26 |
+
# --- Install Python dependencies ---
|
27 |
RUN pip install --upgrade pip
|
28 |
RUN pip install -r requirements.txt
|
29 |
RUN pip install av huggingface_hub
|
30 |
+
RUN pip install --no-binary :all: av # Optional: rebuild AV from source
|
31 |
|
32 |
+
# --- Expose default Gradio port ---
|
|
|
|
|
|
|
33 |
EXPOSE 7860
|
34 |
|
35 |
+
# --- Start the app ---
|
36 |
CMD ["python", "app.py"]
|