Spaces:
Running
Running
File size: 529 Bytes
f0f8ae9 b5a02dc f0f8ae9 b5a02dc f0f8ae9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use Official Python Image
FROM python:3.9
# Set Working Directory
WORKDIR /app
# Copy Files
COPY requirements.txt requirements.txt
COPY app.py app.py
# ✅ Create Writable Cache Directory
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
ENV TRANSFORMERS_CACHE="/app/cache"
ENV HF_HOME="/app/cache"
# Install Dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose Port 7860 (Required by Hugging Face)
EXPOSE 7860
# Start FastAPI Server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|