Spaces:
Runtime error
Runtime error
File size: 1,161 Bytes
cac3c2a 7b48ecf cac3c2a 7b48ecf cac3c2a 7b48ecf 46c577f cac3c2a 7b48ecf 6ad9161 8e3a1db c19d143 7b48ecf c19d143 7b48ecf cac3c2a 7b48ecf cac3c2a 7b48ecf 12171f1 cac3c2a 7b48ecf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# Use a slim Python 3.10 base image for CPU compatibility
ARG BASE_IMAGE=python:3.10-slim
FROM ${BASE_IMAGE}
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
ffmpeg \
libjpeg-dev \
libpng-dev \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip to the latest version
RUN pip install --no-cache-dir --upgrade pip
# Set working directory
WORKDIR /app
# Create cache directory and set permissions
RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache
# Set Hugging Face cache directory
ENV HF_HOME=/app/hf_cache
# Clone Chain-of-Zoom repository into a temporary directory
RUN git clone https://github.com/bryanswkim/Chain-of-Zoom.git /tmp/chain-of-zoom && \
mv /tmp/chain-of-zoom/* . && \
mv /tmp/chain-of-zoom/.* . 2>/dev/null || true && \
rm -rf /tmp/chain-of-zoom
# Copy custom files (overwrites any conflicting files from the repository)
COPY requirements.txt .
COPY app.py .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variable for Hugging Face token
ENV HF_TOKEN=""
EXPOSE 7860
# Command to run the Gradio app
CMD ["python", "app.py"] |