Spaces:
Paused
Paused
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime | |
# --- Set Hugging Face environment variables --- | |
ENV HF_HOME=/app/hf_cache | |
ENV TRANSFORMERS_CACHE=/app/hf_cache | |
# --- Install system-level dependencies --- | |
RUN apt-get update && apt-get install -y \ | |
git ffmpeg curl unzip \ | |
libgl1-mesa-glx \ | |
libxext6 \ | |
&& apt-get clean | |
# --- Set working directory --- | |
WORKDIR /app | |
# --- Copy all files --- | |
COPY . /app | |
# --- Create required cache/weights directories with permissions --- | |
RUN mkdir -p /app/hf_cache /app/ckpt && chmod -R 777 /app | |
# --- Install Python dependencies --- | |
RUN pip install --upgrade pip | |
RUN pip install -r requirements.txt | |
RUN pip install av huggingface_hub | |
RUN pip install --no-binary :all: av # Optional: rebuild AV from source | |
# --- Expose default Gradio port --- | |
EXPOSE 7860 | |
# --- Start the app --- | |
CMD ["python", "app.py"] |