MilesCranmer commited on
Commit
0810b27
·
1 Parent(s): c3da359

Create Dockerfile which launches with IPython

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This builds a dockerfile containing a working copy of PySR
2
+ # with all pre-requisites installed.
3
+
4
+
5
+ ARG VERSION=latest
6
+ FROM julia:$VERSION
7
+
8
+ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
9
+ build-essential python3 python3-dev python3-pip python3-setuptools \
10
+ vim git wget curl \
11
+ && apt-get clean \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ WORKDIR /pysr
15
+
16
+ # Caches install (https://stackoverflow.com/questions/25305788/how-to-avoid-reinstalling-packages-when-building-docker-image-for-python-project)
17
+ ADD ./requirements.txt /pysr/requirements.txt
18
+ RUN pip3 install -r /pysr/requirements.txt
19
+
20
+ # Install PySR:
21
+ ADD . /pysr/
22
+ RUN pip3 install .
23
+
24
+ # Install Julia pre-requisites:
25
+ RUN julia -e 'using Pkg; Pkg.add("SymbolicRegression")'
26
+
27
+ # Install IPython and other useful libraries:
28
+ RUN pip3 install ipython jupyter matplotlib
29
+
30
+ CMD ["ipython"]