CommaGenerateImages / Dockerfile
Axel-Student
change dockerfile
d0ff1b1
raw
history blame contribute delete
520 Bytes
FROM python:3.10
WORKDIR /app
ENV HF_HOME=/app/hf_cache
ENV TRANSFORMERS_CACHE=/app/hf_cache
ENV DIFFUSERS_CACHE=/app/hf_cache
RUN mkdir -p /app/hf_cache
RUN pip install --no-cache-dir torch torchvision torchaudio diffusers fastapi uvicorn
RUN pip install git+https://github.com/huggingface/diffusers.git
RUN pip install transformers
RUN pip install accelerate
RUN pip install huggingface_hub
RUN pip install python-dotenv
COPY . /app
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]