-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (26 loc) · 890 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
27
28
29
30
#
# Copyright © 2021 United States Government as represented by the Administrator
# of the National Aeronautics and Space Administration. No copyright is claimed
# in the United States under Title 17, U.S. Code. All Other Rights Reserved.
#
# SPDX-License-Identifier: NASA-1.3
#
FROM python:slim AS deps
RUN pip install --no-cache-dir poetry
COPY pyproject.toml poetry.lock ./
RUN poetry export --without-hashes -o requirements.txt
FROM python
COPY --from=deps requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && rm requirements.txt
RUN mkdir /app
WORKDIR /app
COPY sensitivity.py .
RUN useradd -r -s /usr/sbin/nologin -d /app app && chown app:app /app
EXPOSE 8501:8501/tcp
USER app:app
ENTRYPOINT [ \
"streamlit", "run", \
"--global.metrics=false", \
"--client.showErrorDetails=false", \
"--browser.gatherUsageStats=false"]
CMD ["sensitivity.py"]