Spaces:
Runtime error
Runtime error
File size: 517 Bytes
3cc890e 312afc1 156783f 4848e5d 3cc890e 312afc1 4848e5d 3cc890e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Use Python as the base image
FROM python:3.9
# Set environment variables for cache
ENV HF_HOME=/tmp/hf_home
# Set the working directory
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the FastAPI app
COPY . .
# Ensure the cache directory is created and has proper permissions
RUN mkdir -p /tmp/hf_home && chmod -R 777 /tmp/hf_home
# Run FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |