Bijoy09's picture
Update Dockerfile
4e9fdd0 verified
raw
history blame
484 Bytes
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
# Expose the port that the app will run on
EXPOSE 7860
# Set environment variable for Hugging Face cache directory
ENV TRANSFORMERS_CACHE="/app/cache"
# Create the cache directory
RUN mkdir -p /app/cache
# Command to run the FastAPI app with Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]