Spaces:
Sleeping
Sleeping
Commit
·
a398433
1
Parent(s):
ab11754
Add back Docker code
Browse files- Dockerfile +17 -17
Dockerfile
CHANGED
|
@@ -25,26 +25,26 @@ ENV PATH="/root/.pyenv/bin:$PATH"
|
|
| 25 |
|
| 26 |
# ENV PYVERSION=${PYVERSION}
|
| 27 |
RUN PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PYVERSION}
|
| 28 |
-
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
|
| 32 |
|
| 33 |
-
#
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
-
#
|
| 38 |
-
#
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
#
|
| 45 |
-
|
| 46 |
|
| 47 |
-
#
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
|
|
|
| 25 |
|
| 26 |
# ENV PYVERSION=${PYVERSION}
|
| 27 |
RUN PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PYVERSION}
|
| 28 |
+
ENV PATH="/root/.pyenv/versions/$PYVERSION/bin:$PATH"
|
| 29 |
|
| 30 |
+
# Install IPython and other useful libraries:
|
| 31 |
+
RUN pip install ipython jupyter matplotlib
|
| 32 |
|
| 33 |
+
# Caches install (https://stackoverflow.com/questions/25305788/how-to-avoid-reinstalling-packages-when-building-docker-image-for-python-project)
|
| 34 |
+
ADD ./requirements.txt /pysr/requirements.txt
|
| 35 |
+
RUN pip3 install -r /pysr/requirements.txt
|
| 36 |
|
| 37 |
+
# Install PySR:
|
| 38 |
+
# We do a minimal copy so it doesn't need to rerun at every file change:
|
| 39 |
+
ADD ./setup.py /pysr/setup.py
|
| 40 |
+
ADD ./README.md /pysr/README.md
|
| 41 |
+
ADD ./pysr/ /pysr/pysr/
|
| 42 |
+
RUN pip3 install .
|
| 43 |
|
| 44 |
+
# Install Julia pre-requisites:
|
| 45 |
+
RUN python3 -c 'import pysr; pysr.install()'
|
| 46 |
|
| 47 |
+
# Add tests
|
| 48 |
+
ADD ./test/ /pysr/test/
|
| 49 |
|
| 50 |
+
CMD ["bash"]
|