-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from nbrg-ppcu/release
Release
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM nvidia/cuda:12.1.1-base-ubuntu22.04 | ||
LABEL maintainer="Balázs Ligeti <obbalasz@gmail.com>" | ||
|
||
# Avoid prompts from apt | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install necessary packages | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
unzip \ | ||
lbzip2 \ | ||
mc \ | ||
libgtextutils-dev \ | ||
sudo \ | ||
curl \ | ||
gpg \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create and switch to the 'prokbert' user before installing Miniconda | ||
RUN useradd -m -s /bin/bash prokbert | ||
USER prokbert | ||
WORKDIR /home/prokbert | ||
|
||
# Install Miniconda as 'prokbert' | ||
RUN mkdir -p /home/prokbert/bin && \ | ||
cd /home/prokbert/bin && \ | ||
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_23.10.0-1-Linux-x86_64.sh && \ | ||
chmod +x Miniconda3-py311_23.10.0-1-Linux-x86_64.sh && \ | ||
./Miniconda3-py311_23.10.0-1-Linux-x86_64.sh -b -p /home/prokbert/miniconda3 && \ | ||
/home/prokbert/miniconda3/bin/conda init bash && \ | ||
echo "source /home/prokbert/miniconda3/etc/profile.d/conda.sh" >> /home/prokbert/.bashrc | ||
|
||
# Set PATH to include the user's conda and potentially other user-specific binaries | ||
ENV PATH /home/prokbert/miniconda3/bin:$PATH | ||
|
||
|
||
# Use pip to install prokbert and other dependencies | ||
RUN pip install prokbert seaborn umap-learn jupyterlab | ||
|
||
# Set up a work directory for prokbert stuff | ||
RUN git clone https://github.com/nbrg-ppcu/prokbert.git | ||
USER prokbert | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Bootstrap: docker | ||
From: nvidia/cuda:12.1.1-base-ubuntu22.04 | ||
|
||
%labels | ||
MAINTAINER Balázs Ligeti <obbalasz@gmail.com> | ||
|
||
%environment | ||
DEBIAN_FRONTEND=noninteractive | ||
PATH=/opt/miniconda3/bin:$PATH | ||
|
||
%post | ||
# Install necessary packages | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
unzip \ | ||
lbzip2 \ | ||
mc \ | ||
libgtextutils-dev \ | ||
sudo \ | ||
curl \ | ||
gpg \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Check if Miniconda is already installed; if not, install it | ||
if [ ! -d "/opt/miniconda3" ]; then | ||
echo "Installing Miniconda..." | ||
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_23.10.0-1-Linux-x86_64.sh -O /tmp/miniconda.sh | ||
bash /tmp/miniconda.sh -b -p /opt/miniconda3 | ||
rm /tmp/miniconda.sh | ||
else | ||
echo "/opt/miniconda3 exists. Skipping Miniconda installation." | ||
fi | ||
|
||
echo "source /opt/miniconda3/etc/profile.d/conda.sh" >> $SINGULARITY_ENVIRONMENT | ||
|
||
# Install Python packages | ||
/opt/miniconda3/bin/pip install prokbert seaborn umap-learn jupyterlab | ||
|
||
# Clone the prokbert repository | ||
git clone https://github.com/nbrg-ppcu/prokbert.git /opt/prokbert | ||
|
||
%runscript | ||
# Define what happens when the container is run without specifying a command | ||
exec /opt/miniconda3/bin/python "$@" | ||
|
||
%help | ||
This container includes the prokbert environment with Miniconda and additional Python packages. |