Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion .github/workflows/build-push-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ name: build-push-container
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['main']
paths:
- '**/env.yml'
- '**/Dockerfile'
- '**/*.dockerfile'
- '.github/workflows/build-push-container.yml'
workflow_dispatch:

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
Expand Down Expand Up @@ -39,6 +43,9 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short,prefix= # Generates a tag like '860c190'
main
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
Expand Down
67 changes: 42 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
FROM condaforge/miniforge3:24.9.2-0
FROM mambaorg/micromamba:1.5.8

# Copy the environment file into /tmp
# Ensure we run as root for apt
USER root

# Update the conda base environment with required packages
COPY env.yml /tmp/env.yml
WORKDIR /tmp

# Install system dependencies
RUN apt-get update \
&& apt-get install -y \
build-essential \
curl \
gcc \
g++ \
RUN apt-get update && apt-get install -y \
# runtime CLIs (KEEP)
curl \
wget \
git \
unzip \
zip \
jq \
procps \
\
# build-only deps (REMOVE LATER)
build-essential \
gcc \
g++ \
&& micromamba install -y -n base -f /tmp/env.yml \
&& micromamba clean -afy \
\
# R packages (need compilers)
&& micromamba run -n base Rscript -e "remotes::install_github('HetzDra/turboGliph@2a5264b')" \
&& micromamba run -n base Rscript -e "remotes::install_github('kalaga27/tcrpheno@56f9372')" \
\
# R cleanup
&& rm -rf /tmp/Rtmp* /root/.cache/R \
\
# REMOVE build deps ONLY
&& apt-get purge -y \
build-essential \
gcc \
g++ \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Update the conda base environment with required packages
WORKDIR /tmp
RUN conda env update -n base --file env.yml

# Install GIANA, patch shebang, symlink for PATH command availability
RUN git init /opt/GIANA && \
cd /opt/GIANA && \
Expand All @@ -29,26 +52,20 @@ RUN git init /opt/GIANA && \

# Install quarto
RUN mkdir -p /opt/quarto/1.6.42 \
&& curl -o quarto.tar.gz -L \
&& curl -o /tmp/quarto.tar.gz -L \
"https://github.com/quarto-dev/quarto-cli/releases/download/v1.6.42/quarto-1.6.42-linux-amd64.tar.gz" \
&& tar -zxvf quarto.tar.gz \
&& tar -zxvf /tmp/quarto.tar.gz \
-C "/opt/quarto/1.6.42" \
--strip-components=1 \
&& rm quarto.tar.gz
&& rm /tmp/quarto.tar.gz

# Install R package not available via conda
RUN Rscript -e "remotes::install_github('HetzDra/turboGliph')"
RUN Rscript -e "remotes::install_github('kalaga27/tcrpheno')"

# Install VDJmatch
# Install VDJmatch and symlink
RUN mkdir -p /opt/vdjmatch/1.3.1 \
&& curl -L -o vdjmatch.zip \
"https://github.com/antigenomics/vdjmatch/releases/download/1.3.1/vdjmatch-1.3.1.zip" \
&& unzip vdjmatch.zip -d /opt/vdjmatch/1.3.1 \
&& rm vdjmatch.zip

# symlink VDJmatch
RUN ln -s /opt/vdjmatch/1.3.1/vdjmatch-1.3.1/vdjmatch-1.3.1.jar /usr/local/bin/vdjmatch.jar
&& rm vdjmatch.zip \
&& ln -s /opt/vdjmatch/1.3.1/vdjmatch-1.3.1/vdjmatch-1.3.1.jar /usr/local/bin/vdjmatch.jar

# Add to PATH
ENV PATH="/opt/quarto/1.6.42/bin:${PATH}"
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading