-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-rest
27 lines (21 loc) · 876 Bytes
/
Dockerfile-rest
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
# Use the official ubuntu image
FROM ubuntu:22.04
# Install gmsh and dependencies
RUN apt-get update -y
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get install -y python3.10
RUN apt-get install -y python3-pip
RUN apt-get install -y python3-gmsh
# Manually install some packages
RUN pip install dash_vtk
# Install Python dependencies
ADD requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir gunicorn
COPY src /src
WORKDIR /src
# Run the web service on container startup. Here we use the gunicorn
# webserver, with one worker process and 8 threads.
# For environments with multiple CPU cores, increase the number of workers
# to be equal to the cores available in Cloud Run.
CMD ["uvicorn", "app.app_rest:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "80"]