@@ -4,23 +4,25 @@ FROM ubuntu:22.04
44# Avoid prompts from apt
55ARG DEBIAN_FRONTEND=noninteractive
66
7- # Install Python and other dependencies, and apply updates
7+ # Install Python, git, and other dependencies, and apply updates
88RUN apt-get update && apt-get upgrade -y && \
9- apt-get install -y python3-pip python3-dev && \
9+ apt-get install -y python3-pip python3-dev git && \
1010 apt-get clean && rm -rf /var/lib/apt/lists/*
1111
12+ # Argument to specify the commit, defaults to the 'master' branch
13+ ARG COMMIT_SHA=master
1214
1315# Set the working directory in the container
1416WORKDIR /usr/src/app
1517
16- # Install SigProfilerMatrixGenerator using pip
17- RUN pip3 install SigProfilerPlotting==1.3.21
18+ # Install the package directly from the specific commit on GitHub
19+ RUN pip3 install 'git+https://github.com/AlexandrovLab/ SigProfilerPlotting.git@' ${COMMIT_SHA}
1820
19- # Create a non-root user named 'spm_user'
21+ # Create a non-root user
2022RUN useradd -m -s /bin/bash spm_user
2123
22- # Change the ownership of the /usr/src/app directory and its contents to the new non-root user
24+ # Change the ownership of the working directory
2325RUN chown -R spm_user:spm_user /usr/src/app
2426
25- # Switch to the non-root user for subsequent commands and when running the container
27+ # Switch to the non-root user for security
2628USER spm_user
0 commit comments