File size: 613 Bytes
f0c8e2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fecebcb
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.8.12-slim-buster

# Install wget and required pip libraries
RUN apt-get update &&\
    apt-get install -y --no-install-recommends wget &&\
    rm -rf /var/lib/apt/lists/* &&\
    pip install --no-cache-dir transformers[torch] uvicorn fastapi

# adds the script defining the QA model to docker
COPY download_model.sh .

# Downloads the required QA model
RUN bash download_model.sh

# copies the app files to the docker image
COPY app/ app/

# runs our application at the start of the docker image
# CMD ["python", "app/main.py"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]