Skip to content

Commit fd8752c

Browse files
committed
[Docker] add docker image for cuda10.0
1 parent b5f8cae commit fd8752c

File tree

4 files changed

+104
-1
lines changed

4 files changed

+104
-1
lines changed

docker/Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2019 Stanford
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
FROM nvidia/cuda:10.0-devel-ubuntu16.04
17+
18+
RUN apt-get update && apt-get install -y --no-install-recommends wget sudo binutils git && \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
RUN wget -c http://developer.download.nvidia.com/compute/redist/cudnn/v7.6.0/cudnn-10.0-linux-x64-v7.6.0.64.tgz && \
22+
tar -xzf cudnn-10.0-linux-x64-v7.6.0.64.tgz -C /usr/local && \
23+
rm cudnn-10.0-linux-x64-v7.6.0.64.tgz && \
24+
ldconfig
25+
26+
RUN wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
27+
mv Miniconda3-latest-Linux-x86_64.sh ~/Miniconda3-latest-Linux-x86_64.sh && \
28+
chmod +x ~/Miniconda3-latest-Linux-x86_64.sh && \
29+
~/Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
30+
rm ~/Miniconda3-latest-Linux-x86_64.sh && \
31+
/opt/conda/bin/conda upgrade --all && \
32+
/opt/conda/bin/conda install conda-build conda-verify && \
33+
/opt/conda/bin/conda clean -ya
34+
35+
RUN /opt/conda/bin/conda install cmake make
36+
RUN /opt/conda/bin/conda install -c conda-forge protobuf=3.9 numpy onnx
37+
RUN /opt/conda/bin/conda install -c anaconda cython
38+
39+
ENV PATH /opt/conda/bin:$PATH
40+
41+
COPY install_taso.sh /install/install_taso.sh
42+
RUN bash /install/install_taso.sh
43+
44+
WORKDIR /usr/TASO
45+
#RUN chmod -R a+w /usr/TASO

docker/install_taso.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# Copyright 2019 Stanford
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
set -e
18+
set -u
19+
set -o pipefail
20+
21+
cd /usr
22+
git clone --recursive https://github.com/jiazhihao/TASO.git
23+
cd /usr/TASO
24+
mkdir -p build
25+
cd build
26+
cmake ..
27+
sudo make install -j10
28+
cd /usr/TASO/python
29+
python setup.py install

docker/run_docker.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2019 Stanford
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
IMAGE_NAME=("$1")
18+
COMMAND="bash"
19+
20+
WORKSPACE="/usr/TASO"
21+
22+
echo "WORKSPACE: ${WORKSPACE}"
23+
echo "IMAGE NAME: ${IMAGE_NAME}"
24+
echo "DOCKER BINARY: nvidia-docker"
25+
26+
nvidia-docker run --rm --pid=host \
27+
-it --net=host \
28+
${IMAGE_NAME} \
29+
${COMMAND[@]}

include/taso/ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2018 Stanford
1+
/* Copyright 2019 Stanford
22
*
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)