story-image-api / Dockerfile
abdalraheemdmd's picture
Update Dockerfile
151afba verified
raw
history blame contribute delete
416 Bytes
FROM python:3.9
WORKDIR /app
# βœ… Set Hugging Face Cache to /tmp
ENV HF_HOME=/tmp/huggingface
ENV TRANSFORMERS_CACHE=/tmp/huggingface
ENV HF_HUB_CACHE=/tmp/huggingface
# βœ… Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir accelerate scipy huggingface_hub
COPY . .
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]