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