|
@@ -1,9 +1,8 @@
|
|
|
FROM python:alpine
|
|
|
|
|
|
# Install required packages
|
|
|
-RUN apk add --update alpine-sdk
|
|
|
+RUN apk add --update --virtual=.build-dependencies alpine-sdk nodejs ca-certificates musl-dev gcc python-dev make cmake g++ gfortran
|
|
|
RUN apk add --update git
|
|
|
-RUN apk add --update nodejs
|
|
|
|
|
|
# Install Jupyter
|
|
|
RUN pip install jupyter
|
|
@@ -13,9 +12,26 @@ RUN jupyter nbextension enable --py widgetsnbextension
|
|
|
# Install JupyterLab
|
|
|
RUN pip install jupyterlab && jupyter serverextension enable --py jupyterlab
|
|
|
|
|
|
+# Additional packages for compatability (glibc)
|
|
|
+RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
|
|
|
+ wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-2.23-r3.apk && \
|
|
|
+ wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-i18n-2.23-r3.apk && \
|
|
|
+ wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-bin-2.23-r3.apk && \
|
|
|
+ apk add --no-cache glibc-2.23-r3.apk glibc-bin-2.23-r3.apk glibc-i18n-2.23-r3.apk && \
|
|
|
+ rm "/etc/apk/keys/sgerrand.rsa.pub" && \
|
|
|
+ /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true && \
|
|
|
+ echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh && \
|
|
|
+ ln -s /usr/include/locale.h /usr/include/xlocale.h && \
|
|
|
+ \
|
|
|
+ apk del glibc-i18n && \
|
|
|
+ apk del .build-dependencies && \
|
|
|
+ rm glibc-2.23-r3.apk glibc-bin-2.23-r3.apk glibc-i18n-2.23-r3.apk && \
|
|
|
+ rm -rf /var/cache/apk/*
|
|
|
+
|
|
|
+ENV LANG=C.UTF-8
|
|
|
+
|
|
|
# Install Python Packages & Requirements (Done near end to avoid invalidating cache)
|
|
|
ADD requirements.txt requirements.txt
|
|
|
-RUN apk add libgcc libstdc++ libpng tcl tk
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
# Expose Jupyter port & cmd
|