Skip to content

Add pyenv install to Dockerfile. #161

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

Closed
wants to merge 2 commits into from
Closed
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
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \
libgtest-dev \
tk-dev \
libsqlite3-dev \
zlib1g-dev \
llvm \
python-openssl \
apt-transport-https \
ca-certificates \
gnupg \
Expand All @@ -53,6 +56,14 @@ WORKDIR /opt/multipy
COPY . .
RUN git submodule update --init --recursive --jobs 0

# install pyenv
FROM dev-base as pyenv-install
RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
export PYENV_ROOT="~/.pyenv" && \
export PATH="$PYENV_ROOT/bin:$PATH"
# dummy cmd to verify installation.
RUN pyenv install --list

# Install conda + neccessary python dependencies
FROM dev-base as conda
ARG PYTHON_VERSION=3.8
Expand All @@ -65,6 +76,7 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
/opt/conda/bin/conda install -y pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch-nightly && \
/opt/conda/bin/conda clean -ya


# Build/Install pytorch with post-cxx11 ABI
FROM conda as build
WORKDIR /opt/multipy/multipy/runtime/third-party/pytorch
Expand Down