File size: 685 Bytes
95636c5 |
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 |
# FROM python:3.10-slim
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt-get update && apt-get install -y \
build-essential \
git \
python3-dev \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY inference.py .
COPY modules ./modules
COPY configs ./configs
COPY hf_utils.py ./
COPY api.py ./
COPY runs ./runs
COPY examples ./examples
ENV PYTHONPATH=/app
ENV HF_HUB_CACHE=/app/checkpoints/hf_cache
ENV TORCH_HOME=/app/checkpoints
ENV API_KEY=12345
EXPOSE 8000
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8000"] |