File size: 960 Bytes
e13455c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Choose our version of Python
FROM python:3.9-slim

# Set up a working directory
WORKDIR /code


# Copy just the requirements into the working directory so it gets cached by itself
COPY ./requirements.txt /code/requirements.txt

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

# RUN pip install pydantic==1.10.8
# RUN pip install typing-inspect==0.8.0 typing_extensions==4.5.
# RUN pip install --force-reinstall typing-extensions==4.5
# RUN pip install --force-reinstall openai==1.8

# Copy the code into the working directory
COPY ./app /code/app

ENV PORT=8000
EXPOSE 8000

# execute the command python main.py (in the WORKDIR) to start the app
CMD ["python", "app/main.py"]

# Tell uvicorn to start spin up our code, which will be running inside the container now
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
# uvicorn app.main:app --host 0.0.0.0 --port 80