Skip to content

Commit 2a9b040

Browse files
committed
initial image
0 parents  commit 2a9b040

File tree

6 files changed

+83
-0
lines changed

6 files changed

+83
-0
lines changed

Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM jupyter/base-notebook:python-3.8.6
2+
3+
MAINTAINER Alex Kaszynski "[email protected]"
4+
5+
USER root
6+
7+
RUN apt-get update \
8+
&& DEBIAN_FRONTEND="noninteractive" apt-get install -yq --no-install-recommends \
9+
libgl1-mesa-glx \
10+
libglu1-mesa \
11+
libsm6 \
12+
xvfb \
13+
libopengl0 \
14+
libegl1 \
15+
software-properties-common \
16+
keyboard-configuration \
17+
kmod \
18+
libglvnd-dev \
19+
pkg-config \
20+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
21+
22+
USER jovyan
23+
24+
# setup the itkwidgets conda enviornment
25+
RUN conda update -n base conda
26+
COPY environment.yml labextensions.txt /tmp/
27+
RUN conda env update --name base --file /tmp/environment.yml
28+
RUN conda run conda install -y nodejs
29+
RUN conda run jupyter labextension install $(cat /tmp/labextensions.txt)
30+
31+
# machine learning and additional plotting
32+
RUN pip install gym==0.17.3 \
33+
tensorflow==2.3.1 \
34+
numpy==1.18.5 \
35+
itk-meshtopolydata==0.6.2 \
36+
ipycanvas==0.6.0
37+
38+
# NVIDIA...
39+
USER root
40+
COPY NVIDIA-Linux-x86_64-450.51.06.run nvidia_drivers.run
41+
RUN ./nvidia_drivers.run -s --no-kernel-module \
42+
&& rm nvidia_drivers.run
43+
44+
# plotting and EGL VTK
45+
COPY vtk-egl-9.0.1-cp38-cp38-linux_x86_64.whl vtk-egl-9.0.1-cp38-cp38-linux_x86_64.whl
46+
RUN pip install vtk-egl-9.0.1-cp38-cp38-linux_x86_64.whl \
47+
&& rm vtk-egl-9.0.1-cp38-cp38-linux_x86_64.whl \
48+
&& pip install pyvista==0.27.2 ipyvtk-simple==0.1.3
49+
50+
# make jovyan sudo
51+
RUN usermod -aG sudo jovyan
52+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
53+
USER jovyan

IMAGE_NAME

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
# contains base image name version
4+
VERSION=v0.5.3
5+
IMAGE=mapdlhelm.azurecr.io/jupyterlab_base:$VERSION

build_image.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# build the ansys-base image single user image and pushes it to azure
6+
source IMAGE_NAME
7+
docker build -t $IMAGE .
8+
docker push $IMAGE

environment.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
channels:
2+
- conda-forge
3+
- defaults
4+
dependencies:
5+
- jupyterlab=2.2.9
6+
- itkwidgets=0.32.0
7+
- ipywidgets=7.5.1
8+
- pandas=1.1.4
9+

labextensions.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@jupyter-widgets/[email protected]
2+
3+
4+
5+
6+

run_image.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source IMAGE_NAME
2+
docker run -it --rm -v /home/alex/python:/mnt/python -v /tmp:/mnt/tmp -p 8888:8888 --gpus all $IMAGE

0 commit comments

Comments
 (0)