HungryListener's picture
Update Dockerfile
04f923e verified
raw
history blame contribute delete
495 Bytes
# Use official Python image
FROM python:3.12
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download SpaCy model
RUN python -m spacy download en_core_web_lg
# Copy the FastAPI app code
COPY . .
# Expose the port FastAPI runs on
EXPOSE 7860
# Command to run the app using Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]