-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile-interactive
42 lines (33 loc) · 1.14 KB
/
Dockerfile-interactive
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
41
42
# Pull main environment
ARG PYTHON_VERSION
FROM ${PYTHON_VERSION}
ENV PYTHONUNBUFFERED=1
ENV DOCKER_ENTRYPOINT_FILE=scripts/docker-entrypoint-interactive.sh
ENV APP_NAME=${INTERACTIVE_APP_NAME}
# Define working directory
WORKDIR /$APP_NAME
ADD poetry.lock /$APP_NAME/poetry.lock
ADD pyproject.toml /$APP_NAME/pyproject.toml
RUN pip install --upgrade pip --no-input
RUN pip install --no-cache-dir poetry
RUN poetry install
# Update env variables
ENV PATH /root/.local/bin:$PATH
ENV PYTHONPATH "${PYTHONPATH}:/"
#ENV PYTHONPATH "${PYTHONPATH}:/.streamlit"
#ENV PYTHONPATH "${PYTHONPATH}:/interactive"
#ENV PYTHONPATH "${PYTHONPATH}:/metrics"
#ENV PYTHONPATH "${PYTHONPATH}:/common"
#ENV PYTHONPATH "${PYTHONPATH}:/scripts"
# Load files from repository
COPY /api /$APP_NAME/api
COPY /.streamlit /$APP_NAME/.streamlit
COPY /interactive /$APP_NAME/interactive
COPY /metrics /$APP_NAME/metrics
COPY /common /$APP_NAME/common
COPY /scripts /$APP_NAME/scripts
COPY /$DOCKER_ENTRYPOINT_FILE /$APP_NAME/$DOCKER_ENTRYPOINT_FILE
RUN chmod +x /$APP_NAME/$DOCKER_ENTRYPOINT_FILE
# Expose port and run command in shell file
EXPOSE 8080
CMD /$APP_NAME/$DOCKER_ENTRYPOINT_FILE