Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
1fdfce8
1
Parent(s):
05fc197
Set docker image version dynamically
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
@@ -1,20 +1,17 @@
|
|
1 |
# This builds a dockerfile containing a working copy of PySR
|
2 |
# with all pre-requisites installed.
|
3 |
|
4 |
-
ARG
|
5 |
-
ARG VERSION=latest
|
6 |
-
ARG PKGVERSION=0.9.5
|
7 |
|
8 |
-
FROM
|
9 |
|
10 |
# metainformation
|
11 |
-
LABEL org.opencontainers.image.version = $PKGVERSION
|
12 |
LABEL org.opencontainers.image.authors = "Miles Cranmer"
|
13 |
LABEL org.opencontainers.image.source = "https://github.com/MilesCranmer/PySR"
|
14 |
LABEL org.opencontainers.image.licenses = "Apache License 2.0"
|
15 |
|
16 |
# Need to use ARG after FROM, otherwise it won't get passed through.
|
17 |
-
ARG PYVERSION=3.
|
18 |
|
19 |
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
20 |
make build-essential libssl-dev zlib1g-dev \
|
@@ -47,6 +44,9 @@ ADD ./setup.py /pysr/setup.py
|
|
47 |
ADD ./pysr/ /pysr/pysr/
|
48 |
RUN pip3 install .
|
49 |
|
|
|
|
|
|
|
50 |
# Install Julia pre-requisites:
|
51 |
RUN python3 -c 'import pysr; pysr.install()'
|
52 |
|
|
|
1 |
# This builds a dockerfile containing a working copy of PySR
|
2 |
# with all pre-requisites installed.
|
3 |
|
4 |
+
ARG JLVERSION=latest
|
|
|
|
|
5 |
|
6 |
+
FROM julia:$JLVERSION
|
7 |
|
8 |
# metainformation
|
|
|
9 |
LABEL org.opencontainers.image.authors = "Miles Cranmer"
|
10 |
LABEL org.opencontainers.image.source = "https://github.com/MilesCranmer/PySR"
|
11 |
LABEL org.opencontainers.image.licenses = "Apache License 2.0"
|
12 |
|
13 |
# Need to use ARG after FROM, otherwise it won't get passed through.
|
14 |
+
ARG PYVERSION=3.10.8
|
15 |
|
16 |
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
17 |
make build-essential libssl-dev zlib1g-dev \
|
|
|
44 |
ADD ./pysr/ /pysr/pysr/
|
45 |
RUN pip3 install .
|
46 |
|
47 |
+
# Load version information from the package:
|
48 |
+
LABEL org.opencontainers.image.version = $(python -c "import pysr; print(pysr.__version__)")
|
49 |
+
|
50 |
# Install Julia pre-requisites:
|
51 |
RUN python3 -c 'import pysr; pysr.install()'
|
52 |
|