Skip to content

Commit 1c0d99f

Browse files
authored
Merge pull request #112 from rasools/OMICSINT_H24
Add session_ml_deep_learning_integration_amd workflow
2 parents c09d2bc + bcbb32c commit 1c0d99f

File tree

3 files changed

+73
-13
lines changed

3 files changed

+73
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and Push Docker Image for lab single cell
2+
3+
on:
4+
push:
5+
paths:
6+
- 'session_ml/SingleCell/**'
7+
branches:
8+
- OMICSINT_H24
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
if: github.repository == 'NBISweden/workshop_omics_integration'
15+
16+
steps:
17+
# Checkout the repository
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
# Set up Docker Buildx for multi-platform builds
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v2
24+
25+
# Log in to Docker Hub using the secrets
26+
- name: Log in to Docker Hub
27+
uses: docker/login-action@v2
28+
with:
29+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
30+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
31+
32+
# Log in to GitHub Container Registry (GHCR)
33+
- name: Log in to GHCR
34+
uses: docker/login-action@v2
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
40+
# Build and push the Docker image for both amd64 to Docker Hub
41+
- name: Build and Push Docker Image to Docker Hub
42+
uses: docker/build-push-action@v4
43+
with:
44+
context: ./session_ml/SingleCell
45+
file: session_ml/SingleCell/Dockerfile
46+
platforms: linux/amd64
47+
push: true
48+
no-cache: true
49+
tags: docker.io/rasoolsnbis/omicsint_h24:session_ml_single_cell_amd
50+
51+
# Build and push the Docker image to GitHub Container Registry (GHCR)
52+
- name: Build and Push Docker Image to GHCR
53+
uses: docker/build-push-action@v4
54+
with:
55+
context: ./session_ml/SingleCell
56+
file: session_ml/SingleCell/Dockerfile
57+
platforms: linux/amd64
58+
push: true
59+
no-cache: true
60+
tags: ghcr.io/${{ github.repository_owner }}/omicsint_h24:session_ml_single_cell_amd
61+
62+
- name: Inspect Docker Image
63+
run: docker buildx imagetools inspect docker.io/rasoolsnbis/omicsint_h24:session_ml_single_cell_amd

session_ml/SingleCell/Dockerfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
1515
&& apt-get -yq update \
1616
&& apt-get -yq install --no-install-recommends \
1717
curl \
18+
wget \
1819
dpkg-sig \
1920
libpq5 \
2021
psmisc \
@@ -69,6 +70,13 @@ RUN mamba env create -f /tmp/SingleCell_env.yml && rm /tmp/SingleCell_env.yml
6970
RUN R -e "install.packages('remotes', repos='http://cran.us.r-project.org')"
7071
RUN R -e "remotes::install_github('satijalab/seurat-data')"
7172

73+
# Download required files to the data directory
74+
RUN mkdir -p /home/jovyan/lab/data \
75+
&& wget -O /home/jovyan/lab/data/google_drive_file.csv "https://drive.google.com/uc?export=download&id=1hBeh2L5PC-T87YObCmJv4Qcm59IqkkOf" \
76+
&& wget -O /home/jovyan/lab/data/atac_v1_pbmc_10k_singlecell.csv "https://cf.10xgenomics.com/samples/cell-atac/1.0.1/atac_v1_pbmc_10k/atac_v1_pbmc_10k_singlecell.csv" \
77+
&& wget -O /home/jovyan/lab/data/atac_v1_pbmc_10k_filtered_peak_bc_matrix.h5 "https://cf.10xgenomics.com/samples/cell-atac/1.0.1/atac_v1_pbmc_10k/atac_v1_pbmc_10k_filtered_peak_bc_matrix.h5" \
78+
&& wget -O /home/jovyan/lab/data/pbmc_10k_v3.rds "https://www.dropbox.com/s/3f3p5nxrn5b3y4y/pbmc_10k_v3.rds?dl=1"
79+
7280
# Download and install RStudio Server
7381
RUN curl -sL "https://download2.rstudio.org/server/focal/${RSTUDIO_ARCH}/rstudio-server-${RSTUDIO_VERSION//+/-}-${RSTUDIO_ARCH}.deb" -o /tmp/rstudio-server.deb && \
7482
echo "64044984a5791690586e21bf4411019ed3dccaf32a69e0838090762f3eba8da0 /tmp/rstudio-server.deb" | sha256sum -c - && \
@@ -113,4 +121,4 @@ RUN chown -R ${USER}:${GROUP} ${HOME}/lab \
113121
USER ${USER}
114122
EXPOSE 8787
115123

116-
ENTRYPOINT ["/etc/run.sh"]
124+
ENTRYPOINT ["/etc/run.sh"]

session_ml/SingleCell/lab/SingleCell_OmicsIntegration.Rmd

+1-12
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,7 @@ library("Seurat")
4848
library("ggplot2")
4949
library("Signac")
5050
51-
52-
#### Data download #################################################################################
53-
# You need to download the following file and include it in the same directory as this notebook
54-
#
55-
# https://drive.google.com/uc?export=download&id=1hBeh2L5PC-T87YObCmJv4Qcm59IqkkOf
56-
#
57-
####################################################################################################
58-
59-
#After downloading the file above, download the following:
60-
#download.file('https://cf.10xgenomics.com/samples/cell-atac/1.0.1/atac_v1_pbmc_10k/atac_v1_pbmc_10k_singlecell.csv', method = 'wget', destfile = 'atac_v1_pbmc_10k_singlecell.csv')
61-
#download.file('https://cf.10xgenomics.com/samples/cell-atac/1.0.1/atac_v1_pbmc_10k/atac_v1_pbmc_10k_filtered_peak_bc_matrix.h5', method = 'wget', destfile = 'atac_v1_pbmc_10k_filtered_peak_bc_matrix.h5')
62-
#download.file('https://www.dropbox.com/s/3f3p5nxrn5b3y4y/pbmc_10k_v3.rds?dl=1', method = 'wget', destfile = 'pbmc_10k_v3.rds')
51+
####################################################################################
6352
6453
#Gene activity quantification (ATACseq peaks)
6554
peaks <- Read10X_h5("data/atac_v1_pbmc_10k_filtered_peak_bc_matrix.h5")

0 commit comments

Comments
 (0)