Skip to content

Commit

Permalink
Add pyenv install to Dockerfile. (pytorch#161)
Browse files Browse the repository at this point in the history
Summary:
As title; we'll need this for py3.7 as conda forge has libpython-static from 3.8 onwards.

Pull Request resolved: pytorch#161

Reviewed By: PaliC

Differential Revision: D39293288

Pulled By: anirbanr-fb-r2p

fbshipit-source-id: b89c397d4549145aa1f55052fc7db664e41c0b0f
  • Loading branch information
anirbanr-fb-r2p authored and facebook-github-bot committed Sep 7, 2022
1 parent 5803bcd commit 192b446
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit 192b446

Please sign in to comment.