generated from IBM/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
26 lines (23 loc) · 855 Bytes
/
Dockerfile
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
FROM python:3.9
ENV PYTHONUNBUFFERED=1
COPY control /opt/microservices/control
COPY prompt-sentences-main /opt/microservices/prompt-sentences-main
COPY static /opt/microservices/static
COPY requirements.txt /opt/microservices/
COPY .env /opt/microservices/
COPY app.py /opt/microservices/
COPY config.py /opt/microservices/
COPY helpers /opt/microservices/helpers
COPY models /opt/microservices/models
RUN pip install --upgrade pip \
&& pip install --upgrade pipenv\
&& apt-get clean \
&& apt-get update \
&& apt install -y build-essential \
&& apt install -y libmariadb3 libmariadb-dev \
&& pip install --no-cache-dir torch==2.0.0 --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir --upgrade -r /opt/microservices/requirements.txt
USER 1001
EXPOSE 8080
WORKDIR /opt/microservices/
CMD ["python", "app.py", "8080"]