Spaces:
Runtime error
Runtime error
Константин
Update Dockerfile to set non-interactive environment and timezone for streamlined package installation.
854099b
# Base image with CUDA support (uses PyTorch image for convenience) | |
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV TZ=Etc/UTC | |
# Install system packages | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
ffmpeg && \ | |
rm -rf /var/lib/apt/lists/* | |
# Set working directory | |
WORKDIR /app | |
# Copy requirements and install Python dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy application code | |
COPY app.py . | |
# Expose port for FastAPI | |
EXPOSE 7860 | |
# Start the FastAPI server using Uvicorn | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |