how is amber related?

how is amber related? what on earth is this doing? does amber depend on cuda? how about tensorflow?


#!/usr/bin/env bash

if [ $# = 0 ]; then
    # circleci build
    echo "CIRCLE_BRANCH", $CIRCLE_BRANCH
    buildfull=`python -c "import os;  print(os.getenv('CIRCLE_BRANCH').startswith('circleci_'))"`
    echo 'buildfull = ' $buildfull

    if [ "$buildfull" == "True" ]; then
        AMBER_BUILD_TASK='ambertools'
        pyversion=`python -c "import os; env=os.getenv('CIRCLE_BRANCH'); print(env.strip('circleci_'))"`
        echo "pyversion = " $pyversion
    else
        AMBER_BUILD_TASK='ambermini'
    fi
else
    # e.g: build ambertools with python=2.7
    # bash scripts/run_docker_build.sh ambertools 2.7
    AMBER_BUILD_TASK=$1 # ambertools or ambermini
    pyversion=$2
fi

echo "AMBER_BUILD_TASK = " $AMBER_BUILD_TASK
echo "Python version = " $pyversion

FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
echo "FEEDSTOCK_ROOT" $FEEDSTOCK_ROOT
DOCKER_IMAGE=ambermd/amber-build-box
BZ2FILE=/root/miniconda3/conda-bld/linux-64/amber*.tar.bz2

docker info

cat << EOF | docker run -i \
                        --rm \
                        -v ${FEEDSTOCK_ROOT}:/feedstock_root \
                        -a stdin -a stdout -a stderr \
                        $DOCKER_IMAGE \
                        bash || exit $?
    export PATH=/root/miniconda3/bin:\$PATH
    conda update --all --yes
    export AMBER_BUILD_TASK=${AMBER_BUILD_TASK}
    echo "Building" \${AMBER_BUILD_TASK}
    export SKIP_REGISTRATION=True
    if [ "\${AMBER_BUILD_TASK}" == 'ambermini' ]; then
        # build in a single containter
        conda build /feedstock_root/recipe --py 2.7 --quiet || exit 1
        conda build /feedstock_root/recipe --py 3.4 --quiet || exit 1
        conda build /feedstock_root/recipe --py 3.5 --quiet || exit 1
    else
        # build whole ambertools, for a single python version
        # should build each ambertools python version on each branch
        conda build /feedstock_root/recipe --py $pyversion --quiet || exit 1
    fi
    cp $BZ2FILE /feedstock_root/
    echo "done. Please check amber*tar.bz2 files in " $FEEDSTOCK_ROOT
EOF

docker2

~# nvidia-docker run -it -p 8888:8888 tensorflow/tensorflow:1.1.0-devel-gpu-py3
1.1.0-devel-gpu-py3: Pulling from tensorflow/tensorflow
c62795f78da9: Pull complete
d4fceeeb758e: Pull complete
5c9125a401ae: Pull complete
0062f774e994: Pull complete
6b33fd031fac: Pull complete
7ab5dd833cf2: Pull complete
df9cc763fcde: Pull complete
9b0174a3640e: Pull complete
1efd10acdd72: Pull complete
f77b671e3092: Pull complete
af9093817c44: Pull complete
b2fb381211f0: Pull complete
af9e216e9ceb: Pull complete
09860f91cae6: Pull complete
9f0f8d45045d: Pull complete
0467b7b5b3c8: Pull complete
311d6a376dba: Pull complete
d775db884640: Pull complete
befeab6b5e5d: Pull complete
7dd802ca32d9: Pull complete
d1a48577f024: Pull complete
9e3601307c1a: Pull complete
057615e69ff0: Pull complete
Digest: sha256:8eaa148ede85f6689aa3ee5c6d6d34e5b05fdc9af7c293a56f59887aedb851d2
Status: Downloaded newer image for tensorflow/tensorflow:1.1.0-devel-gpu-py3
nvidia-docker | 2017/10/17 10:32:09 Error: unsupported CUDA version: driver 6.5 < image 8.0.61

docker

when i do

~$ docker build –pull -t $USER/tensorflow-serving-devel -f Dockerfile.devel .

it doesn’t finish…stole Dockerfile.devel fromhttps://github.com/tensorflow/serving/blob/master/tensorflow_serving/tools/docker/Dockerfile.devel



FROM ubuntu:16.04

MAINTAINER Jeremiah Harmsen <[email protected]>

RUN apt-get update && apt-get install -y \
        build-essential \
        curl \
        git \
        libfreetype6-dev \
        libpng12-dev \
        libzmq3-dev \
        mlocate \
        pkg-config \
        python-dev \
        python-numpy \
        python-pip \
        software-properties-common \
        swig \
        zip \
        zlib1g-dev \
        libcurl3-dev \
        openjdk-8-jdk\
        openjdk-8-jre-headless \
        wget \
        && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set up grpc

RUN pip install mock grpcio

# Set up Bazel.

ENV BAZELRC /root/.bazelrc
# Install the most recent bazel release.
ENV BAZEL_VERSION 0.5.1
WORKDIR /
RUN mkdir /bazel && \
    cd /bazel && \
    curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
    curl -fSsL -o /bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE && \
    chmod +x bazel-*.sh && \
    ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
    cd / && \
    rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh

CMD ["/bin/bash"]

</[email protected]>

but its pulled…

# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nvidia/cuda latest 9d3688f974a1 4 days ago 1.73GB
hello-world latest 05a3bd381fc2 4 weeks ago 1.84kB
tensorflow/tensorflow latest-gpu 4ca1d30fcd9b 2 months ago 3.28GB
nvidia/cuda 6.5 794ce05b823b 10 months ago 1.02GB

because i using cuda 6.5 on my “host” the latest one doesnt work, have to get the one tagged 6.5

# nvidia-docker run –rm -ti nvidia/cuda:6.5 nvcc –version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2014 NVIDIA Corporation
Built on Wed_Aug_27_10:36:36_CDT_2014
Cuda compilation tools, release 6.5, V6.5.16

so what next?