-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
40 lines (27 loc) · 1.09 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# build with the following command
# sudo docker build -t material_xs_plotter .
# run with
# docker run --network host -t material_xs_plotter
FROM ghcr.io/openmc-data-storage/nuclear_data_base_docker:h5_base
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN pip install gunicorn==20.0.4
# finds the avaialble isotopes
ENV OPENMC_CROSS_SECTIONS=/TENDL-2019/cross_sections.xml
COPY find_dropdown_options.py .
RUN python find_dropdown_options.py
COPY header_and_footer.py .
COPY reactions.py .
# COPY assets assets
COPY reactions.py .
COPY app.py .
ENV PORT 8080
EXPOSE 8080
# 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.
# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run
# to handle instance scaling. For more details see
# https://cloud.google.com/run/docs/quickstarts/build-and-deploy/python
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 app:server