File size: 544 Bytes
3e4aa34 7bd1f8b 3e4aa34 7bd1f8b 3e4aa34 7bd1f8b 3e4aa34 d8c29e0 4e9fdd0 d8c29e0 7bd1f8b 3e4aa34 |
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
# Set working directory
WORKDIR /app
# Copy project files
COPY . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create and set the cache directory for Hugging Face
ENV TRANSFORMERS_CACHE="/app/cache"
# Ensure the cache directory exists and has the correct permissions
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Expose the port that the app will run on
EXPOSE 7860
# Command to run the FastAPI app with Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|