File size: 586 Bytes
feb5b5d
3e4aa34
 
feb5b5d
 
 
 
 
3e4aa34
 
feb5b5d
3e4aa34
 
feb5b5d
3e4aa34
 
feb5b5d
3e4aa34
 
feb5b5d
3e4aa34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"]