Spaces:
Sleeping
Sleeping
File size: 558 Bytes
bb8f662 632fce6 bb8f662 | 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 | FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
# System deps
RUN apt-get update && apt-get install -y \
git \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
# Install Python deps
COPY requirements_api.txt .
RUN pip install --no-cache-dir -r requirements_api.txt
# Copy all project files
COPY . .
# Download models before starting server
CMD python download_models.py && uvicorn backend_api:app --host 0.0.0.0 --port 7860
|