Bijoy09's picture
Update Dockerfile
feb5b5d verified
raw
history blame
586 Bytes
# Use the official Python 3.10 image
FROM python:3.10
# Set the Hugging Face token as an environment variable
ARG HUGGINGFACE_HUB_TOKEN
ENV HUGGINGFACE_HUB_TOKEN=${HUGGINGFACE_HUB_TOKEN}
# Set the working directory inside the container
WORKDIR /app
# Copy the local files into the container's working directory
COPY . /app
# Install the dependencies from requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port FastAPI will use
EXPOSE 7860
# Run the FastAPI application using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]