-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjulia.def
57 lines (49 loc) · 1.92 KB
/
julia.def
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
45
46
47
48
49
50
51
52
53
54
55
56
57
Bootstrap: docker
From: julia:1.1.0
%environment
# If you want the julia packages to be installed
# in a different place than ~/.julia, modify
# the variable bellow
# export JULIA_DEPOT_PATH=/some/place/.julia
export JULIA_PROJECT=@.
export PYTHON=/usr/lib/x86_64-linux-gnu/
export GKSwstype=svg
export CUDA_HOME=/usr/local/cuda
CUDA_LIB=$CUDA_HOME/lib64
CUDA_INCLUDE=$CUDA_HOME/include
CUDA_BIN=$CUDA_HOME/bin
export LD_LIBRARY_PATH=$CUDA_LIB:/usr/local/lib
export PATH=$CUDA_BIN:$PATH
%runscript
export JULIA_NUM_THREADS="$(( `nproc` / 2 ))"
exec -B /mnt/storage,/usr/local/cuda /usr/local/julia/bin/julia -O 3 "$@"
%post
apt update
apt install -y wget ssh vim gnupg apt-utils gcc gdb strace
# NVIDIA
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
dpkg -i cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
rm *-repo-*deb
apt clean
apt-get update && apt-get -y install libcublas10 libcudnn7
apt install -y python3 python3-pip \
ffmpeg zlib1g hdf5-tools libcairo2 pdf2svg imagemagick \
libczmq-dev cmake xorg-dev dvipng libxt6 libxrender1 \
mesa-utils libxrandr-dev libxinerama-dev libxcursor-dev \
libgl1-mesa-glx libqt5widgets5 gettext gettext-base
# VirtualGL
wget https://sourceforge.net/projects/virtualgl/files/2.6.1/virtualgl_2.6.1_amd64.deb
dpkg -i virtualgl_2.6.1_amd64.deb
rm virtualgl_2.6.1_amd64.deb
# JuptyerLab
pip3 install jupyterlab
# LaTeX
apt install -y texlive-latex-base \
texlive-latex-recommended \
texlive-luatex \
texlive-latex-extra \
texlive-generic-extra \
texlive-science