Last active
May 22, 2020 10:30
-
-
Save MohamedKari/ab9760875a0de500272d773141a462b5 to your computer and use it in GitHub Desktop.
CUDA with Python Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 | |
SHELL ["/bin/bash", "-c"] | |
ENV PYENV_ROOT="/.pyenv" | |
# Install pyenv dependencies & fetch pyenv | |
# see: https://github.com/pyenv/pyenv/wiki/common-build-problems | |
RUN apt-get update && \ | |
apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git && \ | |
git clone --single-branch --depth 1 https://github.com/pyenv/pyenv.git $PYENV_ROOT | |
ENV PATH="$PYENV_ROOT/bin:$PATH" | |
ENV PATH="$PYENV_ROOT/shims:$PATH" | |
ARG PYTHON_VERSION=3.6.4 | |
RUN pyenv install ${PYTHON_VERSION} && \ | |
pyenv global ${PYTHON_VERSION} | |
ENTRYPOINT [ "python" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment