Spaces:
Sleeping
Sleeping
File size: 628 Bytes
a3a4834 58e1b87 b7d46e9 58e1b87 b7d46e9 535f4a6 20489eb a3a4834 20489eb a3a4834 535f4a6 a3a4834 | 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 python:3.10-slim
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install PyTorch first from official index (fast & reliable CPU wheels)
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir \
torch==2.4.1 torchvision==0.19.1 \
--index-url https://download.pytorch.org/whl/cpu
# Install everything else
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your code
COPY . .
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |