Skip to content

Commit 192b446

Browse files
Add pyenv install to Dockerfile. (#161)
Summary: As title; we'll need this for py3.7 as conda forge has libpython-static from 3.8 onwards. Pull Request resolved: #161 Reviewed By: PaliC Differential Revision: D39293288 Pulled By: anirbanr-fb-r2p fbshipit-source-id: b89c397d4549145aa1f55052fc7db664e41c0b0f
1 parent 5803bcd commit 192b446

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \
3333
libgtest-dev \
3434
tk-dev \
3535
libsqlite3-dev \
36+
zlib1g-dev \
37+
llvm \
38+
python-openssl \
3639
apt-transport-https \
3740
ca-certificates \
3841
gnupg \
@@ -53,6 +56,14 @@ WORKDIR /opt/multipy
5356
COPY . .
5457
RUN git submodule update --init --recursive --jobs 0
5558

59+
# install pyenv
60+
FROM dev-base as pyenv-install
61+
RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
62+
export PYENV_ROOT="~/.pyenv" && \
63+
export PATH="$PYENV_ROOT/bin:$PATH"
64+
# dummy cmd to verify installation.
65+
RUN pyenv install --list
66+
5667
# Install conda + neccessary python dependencies
5768
FROM dev-base as conda
5869
ARG PYTHON_VERSION=3.8
@@ -65,6 +76,7 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
6576
/opt/conda/bin/conda install -y pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch-nightly && \
6677
/opt/conda/bin/conda clean -ya
6778

79+
6880
# Build/Install pytorch with post-cxx11 ABI
6981
FROM conda as build
7082
WORKDIR /opt/multipy/multipy/runtime/third-party/pytorch

0 commit comments

Comments
 (0)