Commit 919bea8c by abergeron Committed by Tianqi Chen

Conda packages with cuda support (#2577)

parent 09ce162c
FROM nvidia/cuda:10.0-devel-centos6
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install conda-build conda-verify && \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
WORKDIR /workspace
RUN chmod -R a+w /workspace
CMD conda build --output-folder /workspace/conda/pkg --variants '{cuda: True, cuda_version: 10.0}' /workspace/conda/tvm-libs
FROM nvidia/cuda:9.2-devel-centos6
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install conda-build conda-verify && \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
WORKDIR /workspace
RUN chmod -R a+w /workspace
CMD conda build --output-folder /workspace/conda/pkg --variants '{cuda: True, cuda_version: 9.2}' /workspace/conda/tvm-libs
#/bin/sh
condadir=`dirname $0`
condadir=`readlink -f $condadir`
srcdir=`dirname $condadir`
docker build -t tvm-cuda100-forge $condadir -f $condadir/Dockerfile.cuda100
docker run --rm -v $srcdir:/workspace tvm-cuda100-forge
docker build -t tvm-cuda92-forge $condadir -f $condadir/Dockerfile.cuda92
docker run --rm -v $srcdir:/workspace tvm-cuda92-forge
sudo chown -R `whoami` $condadir/pkg
python:
- 3.5
- 3.6
- 3.7
\ No newline at end of file
- 3.7
cuda:
- False
......@@ -8,7 +8,7 @@ source:
path: ../..
build:
number: 0
number: 1
skip: True # [win]
requirements:
......
......@@ -8,7 +8,7 @@ source:
path: ../..
build:
number: 0
number: 1
requirements:
host:
......
......@@ -6,10 +6,16 @@ if [ -z "$PREFIX" ]; then
PREFIX="$CONDA_PREFIX"
fi
if [ -z "$cuda" ] || [ "$cuda" == "False" ]; then
CUDA_OPT=""
else
CUDA_OPT="-DUSE_CUDA=ON"
fi
rm -rf build || true
mkdir -p build
cd build
cmake -DUSE_LLVM=ON -DINSTALL_DEV=ON -DCMAKE_INSTALL_PREFIX="$PREFIX" ..
make -j2 VERBOSE=1
cmake $CUDA_OPT -DUSE_LLVM=ON -DINSTALL_DEV=ON -DCMAKE_INSTALL_PREFIX="$PREFIX" ..
make -j4 VERBOSE=1
make install
cd ..
......@@ -8,7 +8,8 @@ source:
path: ../..
build:
number: 0
number: 1
string: cuda{{ cuda_version }}_{{ PKG_BUILDNUM }} # [cuda]
requirements:
build:
......@@ -23,6 +24,8 @@ requirements:
- cmake
- llvmdev ==6.0.0 # [linux]
- zlib # [linux]
run:
- {{ pin_compatible('cudatoolkit', lower_bound=cuda_version, max_pin='x.x') }} # [cuda]
about:
home: https://github.com/dmlc/tvm
......
......@@ -8,7 +8,7 @@ source:
path: ../..
build:
number: 0
number: 1
requirements:
build:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment