Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile Julia 1.3.1->1.5.3 #62

Merged
merged 7 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@ RUN git config --global user.email "email@example.com"
RUN virtualenv -p /usr/bin/python3 /venv
RUN . /venv/bin/activate && pip install jupyter jupytext matplotlib tensorflow torch

RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.3/julia-1.3.1-linux-x86_64.tar.gz
RUN tar -xzv < julia-1.3.1-linux-x86_64.tar.gz
RUN ln -s /julia-1.3.1/bin/julia /usr/bin/julia
# Specify Julia version. Find current version on https://julialang.org/downloads/
ARG JULIA_VERSION_SHORT="1.5"
ARG JULIA_VERSION_FULL="${JULIA_VERSION_SHORT}.3"
ENV JULIA_INSTALLATION_PATH=/opt/julia

RUN wget https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_VERSION_SHORT}/julia-${JULIA_VERSION_FULL}-linux-x86_64.tar.gz && \
tar zxf julia-${JULIA_VERSION_FULL}-linux-x86_64.tar.gz && \
mkdir -p "${JULIA_INSTALLATION_PATH}" && \
mv julia-${JULIA_VERSION_FULL} "${JULIA_INSTALLATION_PATH}/" && \
ln -fs "${JULIA_INSTALLATION_PATH}/julia-${JULIA_VERSION_FULL}/bin/julia" /usr/local/bin/ && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why /usr/local/bin rather than /usr/bin? (answer might be "the convention is pretty vague anyway," just wondering)

Copy link
Collaborator Author

@postylem postylem Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just because @fplk suggested it :) do you have a preference?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/usr/bin is for distribution-managed binaries.

rm julia-${JULIA_VERSION_FULL}-linux-x86_64.tar.gz && \
julia -e 'import Pkg; Pkg.add("IJulia")'

ADD . /gen-quickstart
ENV JULIA_PROJECT=/gen-quickstart
Expand Down
32 changes: 17 additions & 15 deletions Dockerfile.ubuntu-2004
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ MAINTAINER MIT Probabilistic Computing Project
# Avoid tzdata configuration dialog
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -qq && apt install -qq -y \
RUN apt-get update -qq && \
apt-get install -qq -y \
hdf5-tools \
git \
python3-dev \
Expand All @@ -14,23 +15,24 @@ RUN apt update -qq && apt install -qq -y \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*

# Since Tensorflow only supports Python up to 3.7 and not 3.8 (default in 20.04) instead of tensorflow or tf-nightly-cpu we use
# Tensorflow wheel files from https://pypi.org/project/tf-nightly/2.2.0.dev20200307/#files
RUN wget https://files.pythonhosted.org/packages/30/8e/650b282491e126a39e2b256f1ad790d566c53465dfd801a7703e421431e3/tf_nightly-2.2.0.dev20200307-cp38-cp38-manylinux2010_x86_64.whl && \
python3 -m pip install --upgrade pip && \
python3 -m pip install tf_nightly-2.2.0.dev20200307-cp38-cp38-manylinux2010_x86_64.whl && \
rm tf_nightly-2.2.0.dev20200307-cp38-cp38-manylinux2010_x86_64.whl
RUN git config --global user.name "Gen User" && \
git config --global user.email "email@example.com"

RUN git config --global user.name "Gen User"
RUN git config --global user.email "email@example.com"
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install jupyter jupytext matplotlib tensorflow torch

# Could use virtual environment - "RUN virtualenv -p /usr/bin/python3 /venv" and ". /venv/bin/activate" && in front of pip and julia commands
RUN python3 -m pip install jupyter jupytext matplotlib
# Specify Julia version. Find current version on https://julialang.org/downloads/
ARG JULIA_VERSION_SHORT="1.5"
ARG JULIA_VERSION_FULL="${JULIA_VERSION_SHORT}.3"
ENV JULIA_INSTALLATION_PATH=/opt/julia

RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.3/julia-1.3.1-linux-x86_64.tar.gz && \
tar -xzv < julia-1.3.1-linux-x86_64.tar.gz && \
ln -s /julia-1.3.1/bin/julia /usr/bin/julia && \
rm julia-1.3.1-linux-x86_64.tar.gz
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_VERSION_SHORT}/julia-${JULIA_VERSION_FULL}-linux-x86_64.tar.gz && \
tar zxf julia-${JULIA_VERSION_FULL}-linux-x86_64.tar.gz && \
mkdir -p "${JULIA_INSTALLATION_PATH}" && \
mv julia-${JULIA_VERSION_FULL} "${JULIA_INSTALLATION_PATH}/" && \
ln -fs "${JULIA_INSTALLATION_PATH}/julia-${JULIA_VERSION_FULL}/bin/julia" /usr/local/bin/ && \
rm julia-${JULIA_VERSION_FULL}-linux-x86_64.tar.gz && \
julia -e 'import Pkg; Pkg.add("IJulia")'

ADD . /gen-quickstart
ENV JULIA_PROJECT=/gen-quickstart
Expand Down