Meet Patel
Refactor API to use Azure Blob Storage instead of S3; update requirements and remove unused environment variables.
d909d3b
# 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"] |