Spaces:
Sleeping
Sleeping
# Use an official PyTorch GPU-enabled image (with CUDA 11.7 and cuDNN8) | |
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime | |
# Set environment variable for unbuffered output | |
ENV PYTHONUNBUFFERED=1 | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
# Set the working directory | |
WORKDIR /app | |
# Copy and install Python dependencies from requirements.txt | |
COPY requirements.txt . | |
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
# Copy application code | |
COPY app.py . | |
# Expose the default Gradio port | |
EXPOSE 7860 | |
# Run the app | |
CMD ["python", "app.py"] | |