github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/Dockerfile_workstation (about)

     1  FROM leafai/studio-go-runner-dev-base:0.0.5
     2  
     3  # Protobuf version
     4  ENV PROTOBUF_VERSION="3.12.3"
     5  ENV PROTOBUF_ZIP=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
     6  ENV PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOBUF_ZIP}
     7  
     8  RUN wget ${PROTOBUF_URL} && \
     9      unzip ${PROTOBUF_ZIP} -d /usr && \
    10      chmod +x /usr/bin/protoc && \
    11      find /usr/include/google -type d -print0 | xargs -0 chmod ugo+rx && \
    12      chmod -R +r /usr/include/google
    13  
    14  ENV GO_VERSION 1.14.4
    15  
    16  RUN \
    17      mkdir -p /project/go && \
    18      mkdir -p /project/src/github.com/leaf-ai && \
    19      cd /project && \
    20      wget -q -O /tmp/go.tgz https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \
    21      tar xzf /tmp/go.tgz && \
    22      rm /tmp/go.tgz
    23  
    24  RUN mkdir -p /project/.local/bin && \
    25      wget -q -O /project/.local/bin/minio https://dl.minio.io/server/minio/release/linux-amd64/minio  && \
    26      chmod +x /project/.local/bin/minio
    27  
    28  # Install RabbitMQ, originally from https://github.com/dockerfile/rabbitmq/blob/master/Dockerfile
    29  #
    30  # In many configurations used for testing this server wont actually be used but is present
    31  # for situations where kubernetes and rabbitMQ deployments are not available
    32  #
    33  RUN wget -q -O - 'https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc' | apt-key add - && \
    34      echo "deb https://dl.bintray.com/rabbitmq/debian bionic main erlang" | tee /etc/apt/sources.list.d/bintray.rabbitmq.list && \
    35      apt-get -y --allow-unauthenticated update && \
    36      DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated rabbitmq-server && \
    37      rabbitmq-plugins enable rabbitmq_management && \
    38      echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config && \
    39      mkdir -p /data
    40  
    41  ENV RABBITMQ_LOG_BASE /data/log
    42  ENV RABBITMQ_MNESIA_BASE /data/mnesia
    43  
    44  ENV GOPATH=/project
    45  ENV PATH=$GOPATH/bin:$PATH
    46  ENV PATH=$PATH:/project/.local/bin:/project/go/bin
    47  ENV GOROOT=/project/go
    48  
    49  ARG RUNNER_BUILD_LOG
    50  ENV RUNNER_BUILD_LOG ${RUNNER_BUILD_LOG}
    51  
    52  ENV LOGXI='*=INF'
    53  ENV LOGXI_FORMAT='happy,maxcol=1024'
    54  
    55  WORKDIR /project/src/github.com/leaf-ai
    56  
    57  RUN mkdir $GOPATH/bin && \
    58      (curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh) && \
    59      git config --global url."git://github.com".insteadOf "https://github.com" && \
    60      rm /usr/bin/nvidia-*
    61  
    62  CMD /bin/bash -c 'git clone https://github.com/leaf-ai/studio-go-runner.git && cd studio-go-runner && git checkout $GIT_BRANCH && source ./base-build.sh'
    63  
    64  # Done last to prevent lots of disruption when bumping versions
    65  LABEL vendor="Cognizant, AI&A" \
    66        dev.cognizant-ai.module.version={{.duat.version}} \
    67        dev.cognizant-ai.module.name={{.duat.module}}