File size: 518 Bytes
49945fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Use python 3.9 slim image
FROM python:3.9-slim

# Set working directory
WORKDIR /code

# Copy requirements first (for caching)
COPY ./requirements.txt /code/requirements.txt

# Install dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the model directory and code
# MAKE SURE your model is unzipped in a folder named 'model'
COPY ./model /code/model
COPY ./main.py /code/main.py

# Run the app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]