-
Notifications
You must be signed in to change notification settings - Fork 7
/
voila.Dockerfile
44 lines (31 loc) · 1.3 KB
/
voila.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
41
42
43
44
FROM ubuntu:20.04
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# See http://bugs.python.org/issue19846
ENV LANG=C.UTF-8
# build hangs on tzdata input
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV POETRY_VERSION=1.1.0 \
PIP_DISABLE_PIP_VERSION_CHECK=on \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PYTHONUNBUFFERED=1 \
POETRY_HOME=/poetry \
POETRY_REPOSITORIES_PALAIMON_URL=https://pypi.palaimon.io/
RUN apt-get update && apt-get install -y --no-install-recommends \
wget curl \
git \
python3-dev \
python3-pip
# uses $POETRY_VERSION & $POETRY_HOME internally
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
ENV PATH=${POETRY_HOME}/bin:${PATH}
COPY . /app
WORKDIR /app
RUN poetry install --no-dev
# poetry dependency resolution is slow
#RUN poetry add voila tqdm
RUN poetry run pip install voila tqdm
EXPOSE 8080
ENTRYPOINT ["poetry", "run", "voila", "--enable_nbextensions=True", "--no-browser", "--port=8080"]
CMD ["nbs/09_voila_example.ipynb"]