Skip to content

Commit

Permalink
Merge pull request #61 from HumanCellAtlas/cw_add_analysis_tools_docker
Browse files Browse the repository at this point in the history
Add gcloud components to analysis-tools docker and fix minor bugs.
  • Loading branch information
rexwangcc authored Dec 18, 2017
2 parents 1db468f + fc6827d commit 06e11d0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docker/analysis-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ RUN apt update && apt install -y \
libboost-all-dev \
libbz2-dev \
liblzma-dev \
lsb-release \
r-base \
r-base-core \
r-base-dev \
samtools \
sudo \
wget \
zlib1g-dev

Expand All @@ -57,6 +59,7 @@ RUN pip3 install \
tables==3.4.2 \
google-cloud-storage \
git+git://github.com/HumanCellAtlas/pipeline-tools.git

# Fix cannot import name 'opentype' error
RUN pip3 install --upgrade google-auth-oauthlib

Expand All @@ -68,14 +71,17 @@ RUN Rscript -e "install.packages('ggplot2')"
RUN Rscript -e "install.packages('googleCloudStorageR')"

# Mount Google Cloud secret key
ADD broad-dsde-mint-dev-ed8cc09c48e5.json /usr/secrets/broad-dsde-mint-dev-ed8cc09c48e5.json
ADD broad-dsde-mint-dev-testR.json /usr/secrets/broad-dsde-mint-dev-testR.json

# Set the environment variable for Python
ENV GOOGLE_APPLICATION_CREDENTIALS=/usr/secrets/broad-dsde-mint-dev-ed8cc09c48e5.json
ENV GOOGLE_APPLICATION_CREDENTIALS=/usr/secrets/broad-dsde-mint-dev-testR.json

# Set the environment variable for R
ENV GCS_AUTH_FILE=/usr/secrets/broad-dsde-mint-dev-ed8cc09c48e5.json


ENV GCS_AUTH_FILE=$GOOGLE_APPLICATION_CREDENTIALS

# Install gcloud components
RUN curl -sSL https://sdk.cloud.google.com > /tmp/gcl && bash /tmp/gcl --install-dir=/usr/gcloud --disable-prompts

# Configure gcloud
ENV PATH $PATH:/usr/gcloud/google-cloud-sdk/bin
RUN gcloud auth activate-service-account --key-file=$GCS_AUTH_FILE

0 comments on commit 06e11d0

Please sign in to comment.