Spaces:
Sleeping
Sleeping
File size: 559 Bytes
919f56e bd77c32 919f56e bd77c32 c963314 bd77c32 919f56e bd77c32 919f56e bd77c32 c963314 919f56e bd77c32 c963314 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Create a cache directory with appropriate permissions
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Set environment variables for Hugging Face cache
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_HOME=/app/cache
ENV PORT=7860
# Copy and install requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Expose port
EXPOSE 7860
# Run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|