Skip to content

Commit a9e7c3e

Browse files
committed
Julia Dockerfile broken out.
1 parent 7ff854d commit a9e7c3e

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.packaging/Dockerfile.julia_env

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
ARG UBUNTU_VERSION=22.04
2+
ARG CUSTOM_CERT
3+
ARG ENABLE_LEGACY_RENEGOTIATION
4+
5+
FROM ubuntu:$UBUNTU_VERSION
6+
7+
ARG CUSTOM_CERT
8+
ARG ENABLE_LEGACY_RENEGOTIATION
9+
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
12+
# Install the base dependencies
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
python3 \
15+
python3-dev \
16+
python-is-python3 \
17+
wget \
18+
curl \
19+
ca-certificates \
20+
build-essential \
21+
pkg-config \
22+
bzip2 \
23+
gcc \
24+
g++ \
25+
gfortran \
26+
cmake \
27+
ninja-build \
28+
git \
29+
make
30+
31+
# Setup a custom certificate/SSL settings depending upon build arguments
32+
# Include README.md here so that the build doesn't fail if there is no custom
33+
# certificate specified. Then we just delete it afterwards.
34+
COPY README.md $CUSTOM_CERT /usr/local/share/ca-certificates/
35+
RUN rm /usr/local/share/ca-certificates/README.md \
36+
&& update-ca-certificates
37+
RUN if [ -n "$ENABLE_LEGACY_RENEGOTIATION" ]; then echo "Options = UnsafeLegacyRenegotiation" >> /etc/ssl/openssl.cnf ; fi
38+
39+
# Install Julia
40+
RUN git clone -b emit-per-package-bitcode --depth=1 https://github.com/llvm-ml/julia /julia \
41+
&& cd /julia \
42+
&& make MARCH=x86-64 -j $(nproc) \
43+
&& echo prefix=/usr > Make.user \
44+
&& make MARCH=x86-64 install \
45+
&& cd / \
46+
&& rm -rf /julia
47+
48+
# Set up the Python dependencies
49+
COPY Pipfile* ./
50+
RUN pip3 install pipenv \
51+
&& pipenv sync --categories "packages dev-packages" --system \
52+
&& pipenv --clear \
53+
&& rm Pipfile*
54+
55+
# Clean up the Docker container to make the image smaller
56+
RUN apt-get autoremove -y --purge \
57+
&& apt-get clean -y \
58+
&& rm -rf /var/lib/apt/lists/*
59+
60+
ENV DEBIAN_FRONTEND=

0 commit comments

Comments
 (0)