Spaces:
Runtime error
Runtime error
File size: 585 Bytes
fd7058d d1466b4 cb120eb fd7058d d1466b4 fd7058d d1466b4 fd7058d d1466b4 fd7058d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | FROM python:3.10-slim
WORKDIR /app
# Set the HuggingFace Transformers cache directory
ENV TRANSFORMERS_CACHE=/app/cache
# Create the cache directory and ensure it's writable
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Install system dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Copy files and install dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy app code
COPY main.py .
# Run the FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|