File size: 501 Bytes
998eef8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Use the official Python image from Docker Hub
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the local FastAPI app to the container
COPY . /app

# Install the necessary dependencies
RUN pip install --no-cache-dir --upgrade pip && \

    pip install fastapi uvicorn huggingface_hub pydantic

# Expose port 80 for FastAPI
EXPOSE 80

# Set the entry point for the application
CMD ["uvicorn", "new:app", "--host", "0.0.0.0", "--port", "80"]