Spaces:
Sleeping
Sleeping
File size: 498 Bytes
46fc4ae 5637e0f 46fc4ae 5637e0f 46fc4ae 5637e0f 46fc4ae 5637e0f 72832ac 5637e0f ef77a1a 46fc4ae 5637e0f 46fc4ae bcdea40 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Use a base image with Python
FROM python:3.10-slim
# Copy your code
WORKDIR /app
COPY . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
ENV HF_HOME=/app/.cache
ENV HF_DATASETS_CACHE=/app/.cache/datasets
ENV TRANSFORMERS_CACHE=/app/.cache/transformers
# Expose the port your FastAPI app runs on (e.g. 7860)
EXPOSE 7860
# Run your FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|