Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PD-2560: Add gsutil to snm3c Dockerfile #132

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions 3rd-party-tools/m3c-yap-hisat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ FROM --platform="linux/amd64" mambaorg/micromamba:0.23.0

WORKDIR /usr/gitc
RUN echo $PATH
ENV PATH="$PATH:/opt/conda/bin:/root/pkg/hisat-3n"
ENV GCLOUD_DIR="/opt/gcloud" \
GOOGLE_CLOUD_CLI_VERSION="397.0.0"
ENV PATH="/opt/conda/bin:/root/pkg/hisat-3n:$GCLOUD_DIR/google-cloud-sdk/bin:$PATH"
RUN echo $PATH

USER root
Expand All @@ -12,13 +14,13 @@ USER root
# docker build --build-arg gcp=true -t mapping-gcp:tag .
ARG gcp
RUN if [ "$gcp" = "true" ] ; then \
apt-get update && \
apt-get install -y curl gnupg && \
apt-get update; \
apt-get install -y curl gnupg; \
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | \
tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
tee -a /etc/apt/sources.list.d/google-cloud-sdk.list; \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update -y && \
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - ; \
apt-get update -y; \
apt-get install google-cloud-sdk -y; \
else echo 'no gcp install'; \
fi
Expand All @@ -29,7 +31,7 @@ RUN apt-get update; \
apt-get install -y build-essential

COPY --chown=$MAMBA_USER:$MAMBA_USER hisat3n_env.yml /tmp/hisat3n_env.yml
RUN micromamba install -y -f /tmp/hisat3n_env.yml && \
RUN micromamba install -y -f /tmp/hisat3n_env.yml; \
micromamba clean --all --yes

ARG MAMBA_DOCKERFILE_ACTIVATE=1
Expand All @@ -43,4 +45,10 @@ RUN mkdir -p ~/pkg; \
git checkout -b hisat-3n origin/hisat-3n; \
make; \
echo 'export PATH=$HOME/pkg/hisat-3n:$PATH' >> ~/.bashrc; \
source ~/.bashrc
source ~/.bashrc; \
# get gsutil
mkdir -p $GCLOUD_DIR; \
curl -so $HOME/google-cloud-cli.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${GOOGLE_CLOUD_CLI_VERSION}-linux-x86_64.tar.gz; \
tar -xzf $HOME/google-cloud-cli.tar.gz -C $GCLOUD_DIR; \
.$GCLOUD_DIR/google-cloud-sdk/install.sh --usage-reporting false; \
rm $HOME/google-cloud-cli.tar.gz
Loading