-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (33 loc) · 1.2 KB
/
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
FROM jupyter/base-notebook:lab-3.2.9
MAINTAINER PyAnsys Maintainers "[email protected]"
USER root
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -yq --no-install-recommends \
libgl1-mesa-glx \
libglu1-mesa \
libsm6 \
libopengl0 \
libegl1 \
software-properties-common \
keyboard-configuration \
kmod \
libglvnd-dev \
pkg-config \
libosmesa6 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
USER jovyan
# initial setup enviornment to install jupyterlab
RUN conda update -n base conda
RUN conda install mamba -n base -c conda-forge
# install enviornment
COPY environment.yml /tmp/
RUN mamba env update -n base --file /tmp/environment.yml
# override vtk with custom VTK with OSMesa
# don't uninstall VTK as cadquery depends on some of the libraries, but ignore it so we can keep then while getting the benefits for osmesa
RUN pip install https://github.com/pyvista/pyvista-wheels/raw/main/vtk-osmesa-9.1.0-cp39-cp39-linux_x86_64.whl --ignore-installed
# make jovyan sudo
USER root
RUN echo 'export PATH="/opt/conda/bin:$PATH"' >> /etc/profile
RUN usermod -aG sudo jovyan
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER jovyan