Spaces:
Sleeping
Sleeping
File size: 672 Bytes
3845214 95070fc 3845214 95070fc 3845214 95070fc 3845214 95070fc c0c8332 57617ff 3845214 95070fc 3845214 |
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 |
# Base image
FROM python:3.12-slim
# Prevent prompts
ENV DEBIAN_FRONTEND=noninteractive
# Set workdir
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
git \
build-essential \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy everything
COPY . .
# Install Python dependencies
RUN pip install --no-cache-dir \
torch \
torchaudio \
requests \
transformers \
fastapi \
uvicorn[standard] \
python-multipart \
starlette\
torchcodec
# Expose port
EXPOSE 7860
# Start API server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|