-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.jl
51 lines (47 loc) · 1.55 KB
/
Dockerfile.jl
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
FROM julia:1.8.2
LABEL Yangyang Fu
USER root
# add user
RUN export uid=1000 gid=1000 && \
mkdir -p /home/developer && \
mkdir -p /etc/sudoers.d && \
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:${uid}:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown ${uid}:${gid} -R /home/developer && \
mkdir -m 1777 /tmp/.X11-unix
USER developer
ENV HOME /home/developer
# add julia packages
RUN julia -e 'using Pkg; Pkg.activate(); Pkg.instantiate(); \
Pkg.add("ModelingToolkitStandardLibrary"); \
Pkg.add("Lux"); \
Pkg.add("Flux"); \
Pkg.add("ForwardDiff"); \
Pkg.add("Zygote"); \
Pkg.add("OptimizationOptimisers"); \
Pkg.add("ModelingToolkit"); \
Pkg.add("OptimizationNLopt"); \
Pkg.add("OptimizationEvolutionary"); \
Pkg.add("DiffEqFlux"); \
Pkg.add("DifferentialEquations"); \
Pkg.add("Optimization"); \
Pkg.add("OptimizationOptimJL"); \
Pkg.add("Plots"); \
Pkg.add("Random"); \
using ModelingToolkitStandardLibrary; \
using Lux; \
using Flux; \
using ForwardDiff; \
using Zygote; \
using OptimizationOptimisers; \
using ModelingToolkit; \
using OptimizationNLopt; \
using OptimizationEvolutionary; \
using DiffEqFlux; \
using DifferentialEquations; \
using Optimization; \
using OptimizationOptimJL; \
using Plots; \
using Random'