This repository has been archived by the owner on Oct 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mitmul/create-wheels
Create wheels
- Loading branch information
Showing
14 changed files
with
393 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,65 @@ | ||
ARG CUDA_VERSION=9.1 | ||
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu16.04 | ||
ARG cuda_version | ||
FROM nvidia/cuda:${cuda_version}-devel-ubuntu16.04 | ||
|
||
ENV NVIDIA_VISIBLE_DEVICES all | ||
ENV NVIDIA_DRIVER_CAPABILITIES compute,video,utility | ||
ENV NVIDIA_DRIVER_CAPABILITIES=video,compute,utility | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-tk \ | ||
gawk | ||
|
||
RUN pip3 install \ | ||
cython \ | ||
numpy \ | ||
matplotlib | ||
RUN echo ${CUDA_VERSION} | sed -E "s/\.//g" | awk '{print substr ($0, 0, 2)}' | xargs -I{} pip3 install cupy-cuda{} | ||
python \ | ||
python-dev \ | ||
python-pip \ | ||
python-wheel \ | ||
python-setuptools \ | ||
gawk \ | ||
make \ | ||
build-essential \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
wget \ | ||
curl \ | ||
llvm \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
xz-utils \ | ||
tk-dev \ | ||
git | ||
|
||
WORKDIR /root | ||
|
||
ENV HOME /root | ||
|
||
# Install pyenv. | ||
RUN git clone https://github.com/pyenv/pyenv.git ${HOME}/.pyenv | ||
ENV PYENV_ROOT ${HOME}/.pyenv | ||
ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PYENV_ROOT}/libexec:${PATH} | ||
RUN eval "$(pyenv init -)" | ||
RUN pyenv versions | ||
|
||
# Install Python. | ||
ARG python_versions | ||
# RUN pyenv install 3.5.1 | ||
RUN for VERSION in ${python_versions}; do \ | ||
echo "Installing Python ${VERSION}..." && \ | ||
pyenv install ${VERSION} && \ | ||
pyenv global ${VERSION} && \ | ||
pyenv rehash && \ | ||
echo "Finished"; \ | ||
done; | ||
RUN pyenv versions | ||
|
||
# Install Python libraries. | ||
ARG cython_version | ||
ARG cupy_version | ||
ARG cupy_package_name | ||
RUN for VERSION in ${python_versions}; do \ | ||
echo "Installing libraries on Python ${VERSION}..." && \ | ||
pyenv global ${VERSION} && \ | ||
pip install -U pip setuptools && \ | ||
pip install argparse && \ | ||
pip install Cython==${cython_version} wheel auditwheel && \ | ||
pip install numpy matplotlib ${cupy_package_name}; \ | ||
done; | ||
|
||
ENV MPLBACKEND Agg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
ARG cuda_version | ||
FROM mitmul/pynvvl:cuda-${cuda_version} | ||
|
||
ENV NVIDIA_DRIVER_CAPABILITIES=video,compute,utility | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
python \ | ||
python-dev \ | ||
python-pip \ | ||
python-wheel \ | ||
python-setuptools \ | ||
gawk \ | ||
make \ | ||
build-essential \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
wget \ | ||
curl \ | ||
llvm \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
xz-utils \ | ||
tk-dev \ | ||
git | ||
|
||
WORKDIR /root | ||
|
||
ENV HOME /root | ||
|
||
# Install pyenv. | ||
RUN git clone https://github.com/pyenv/pyenv.git ${HOME}/.pyenv | ||
ENV PYENV_ROOT ${HOME}/.pyenv | ||
ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PYENV_ROOT}/libexec:${PATH} | ||
RUN eval "$(pyenv init -)" | ||
RUN pyenv versions | ||
|
||
# Install Python. | ||
ARG python_versions | ||
# RUN pyenv install 3.5.1 | ||
RUN for VERSION in ${python_versions}; do \ | ||
echo "Installing Python ${VERSION}..." && \ | ||
pyenv install ${VERSION} && \ | ||
pyenv global ${VERSION} && \ | ||
pyenv rehash && \ | ||
echo "Finished"; \ | ||
done; | ||
RUN pyenv versions | ||
|
||
# Install Python libraries. | ||
ARG cython_version | ||
ARG cupy_package_name | ||
ARG cupy_version | ||
RUN for VERSION in ${python_versions}; do \ | ||
echo "Installing libraries on Python ${VERSION}..." && \ | ||
pyenv global ${VERSION} && \ | ||
pip install -U pip setuptools && \ | ||
pip install argparse && \ | ||
pip install Cython==${cython_version} wheel auditwheel && \ | ||
pip install ${cupy_package_name}==${cupy_version} && \ | ||
pip freeze; \ | ||
done; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
#!/bin/bash | ||
|
||
build_docker_image() { | ||
docker build -t mitmul/pynvvl:cuda-$1 --build-arg CUDA_VERSION=$1 -f docker/Dockerfile.build-nvvl docker | ||
docker build -t mitmul/pynvvl:cuda-$1 \ | ||
--build-arg CUDA_VERSION=$1 \ | ||
-f docker/Dockerfile.build-nvvl docker | ||
docker push mitmul/pynvvl:cuda-$1 | ||
docker build -t mitmul/pynvvl:cuda-$1-dev --build-arg CUDA_VERSION=$1 -f docker/Dockerfile.develop docker | ||
|
||
docker build -t mitmul/pynvvl:cuda-$1-dev \ | ||
--build-arg CUDA_VERSION=$1 \ | ||
--build-arg CUPY_PACKAGE_NAME=$2 \ | ||
-f docker/Dockerfile.develop docker | ||
docker push mitmul/pynvvl:cuda-$1-dev | ||
} | ||
|
||
build_docker_image 8.0 | ||
build_docker_image 9.0 | ||
build_docker_image 9.1 | ||
build_docker_image 8.0 cupy-cuda80 | ||
build_docker_image 9.0 cupy-cuda90 | ||
build_docker_image 9.1 cupy-cuda91 |
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
Oops, something went wrong.