Today I tried to create a Dockerfile for XEUS-Cling in Jupyterlab. The challenge was, that the installation is done with conda which is a little bit tricky to use together with Docker. After some unsuccessful trials, I finally came up with the following working solution:
FROM continuumio/miniconda3:4.8.2-alpine
MAINTAINER phil schatzmann
USER root
RUN apk add --no-cache bash
SHELL ["/bin/bash","--login","-c"]
ENV PATH /opt/conda/envs/cling/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN conda create -y -n cling xeus-cling xeus-python jupyterlab -c conda-forge
WORKDIR /home/xeus-cling
EXPOSE 8888
CMD ["jupyter", "lab", "--port=8888", "--no-browser", "--allow-root", "--ip=0.0.0.0" ]
I am using it together with docker-compose. The docker-compose.yml looks as follows:
version: '3.2'
services:
cling:
image: pschatzmann/xeus-cling
container_name: cling
restart: always
ports:
- 8888:8888
volumes:
- /srv/data-science:/home/xeus-cling
- /data:/data
environment:
- TZ=Europe/Zurich
dns:
- 8.8.8.8
Finally I double check if it is working properly:
0 Comments