Masoud KA
commited on
Commit
•
b111f5d
1
Parent(s):
7a552bf
Initial Commit
Browse files- apptainer_def_files/miniconda.def +50 -0
- apptainer_def_files/py310_novenv.def +19 -0
- apptainer_def_files/py310_torch.def +34 -0
- apptainer_def_files/py311_almalinux.def +117 -0
- apptainer_def_files/py311_conda.def +18 -0
- apptainer_def_files/py311_novenv.def +19 -0
- apptainer_def_files/py311_poetry.def +74 -0
- apptainer_def_files/py311_torch.def +73 -0
- apptainer_def_files/py311_torch_alpine.def +26 -0
- apptainer_def_files/py311_torch_minimal.def +31 -0
- apptainer_def_files/py311_torch_mpi.def +52 -0
- apptainer_def_files/py311_torch_srun.def +31 -0
- docker/Dockerfile +64 -0
- docker/Dockerfile_conda +88 -0
- docker/Dockerfile_python +86 -0
- docker/Dockerfile_ubuntu +88 -0
apptainer_def_files/miniconda.def
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: continuumio/miniconda3
|
3 |
+
|
4 |
+
%environment
|
5 |
+
export DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
%post
|
8 |
+
apt-get update && \
|
9 |
+
apt-get install -y --no-install-recommends \
|
10 |
+
ca-certificates \
|
11 |
+
build-essential \
|
12 |
+
git \
|
13 |
+
curl \
|
14 |
+
tmux \
|
15 |
+
htop \
|
16 |
+
nano \
|
17 |
+
vim \
|
18 |
+
pipx \
|
19 |
+
libreadline-dev \
|
20 |
+
libncursesw5-dev \
|
21 |
+
libssl-dev \
|
22 |
+
libsqlite3-dev \
|
23 |
+
libgdbm-dev \
|
24 |
+
libc6-dev \
|
25 |
+
libbz2-dev \
|
26 |
+
libffi-dev \
|
27 |
+
libpq-dev \
|
28 |
+
liblzma-dev \
|
29 |
+
libopenblas-dev \
|
30 |
+
libgl1-mesa-dev \
|
31 |
+
libglib2.0-0 \
|
32 |
+
libsm6 \
|
33 |
+
libxext6 \
|
34 |
+
ffmpeg \
|
35 |
+
tk-dev \
|
36 |
+
ninja-build && \
|
37 |
+
apt-get clean && \
|
38 |
+
rm -rf /var/lib/apt/lists/*
|
39 |
+
|
40 |
+
# run conda init and source bashrc
|
41 |
+
conda init bash
|
42 |
+
|
43 |
+
. /root/.bashrc
|
44 |
+
|
45 |
+
# Create a directory for project files
|
46 |
+
mkdir -p /project
|
47 |
+
|
48 |
+
%runscript
|
49 |
+
# Run the command using the script
|
50 |
+
exec "$@"
|
apptainer_def_files/py310_novenv.def
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
#From: python:latest
|
3 |
+
#From: python:3.11-slim
|
4 |
+
From: python:3.10
|
5 |
+
|
6 |
+
%post
|
7 |
+
# Create the app directory in /home within the container's filesystem
|
8 |
+
mkdir -p app
|
9 |
+
|
10 |
+
# Upgrade pip
|
11 |
+
pip install --no-cache-dir --upgrade pip
|
12 |
+
|
13 |
+
# Install dependencies
|
14 |
+
echo "Installing Python dependencies..."
|
15 |
+
pip install --no-cache-dir torch torchvision torchaudio lightning tensorboard pycocotools matplotlib
|
16 |
+
|
17 |
+
%runscript
|
18 |
+
# Run the given command
|
19 |
+
exec "$@"
|
apptainer_def_files/py310_torch.def
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: python:3.10
|
3 |
+
|
4 |
+
%post
|
5 |
+
# Create the app directory at the top level of the container's filesystem
|
6 |
+
mkdir -p /app
|
7 |
+
|
8 |
+
# Navigate to the app directory
|
9 |
+
cd /app
|
10 |
+
|
11 |
+
# Create a virtual environment
|
12 |
+
python -m venv myenv
|
13 |
+
|
14 |
+
# Activate the virtual environment
|
15 |
+
. /app/myenv/bin/activate
|
16 |
+
|
17 |
+
# Upgrade pip
|
18 |
+
pip install --no-cache-dir --upgrade pip
|
19 |
+
|
20 |
+
# Install dependencies
|
21 |
+
echo "Installing Python dependencies..."
|
22 |
+
pip install --no-cache-dir torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121 lightning=2.2.4 tensorboard pycocotools matplotlib mlflow
|
23 |
+
#pip install --no-cache-dir torch torchvision torchaudio lightning=2.2.4 tensorboard pycocotools matplotlib mlflow
|
24 |
+
|
25 |
+
%environment
|
26 |
+
# Set the environment variable to activate the virtual environment by default
|
27 |
+
. /app/myenv/bin/activate
|
28 |
+
|
29 |
+
%runscript
|
30 |
+
# Activate the virtual environment
|
31 |
+
. /app/myenv/bin/activate
|
32 |
+
|
33 |
+
# Run the given command
|
34 |
+
exec "$@"
|
apptainer_def_files/py311_almalinux.def
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: almalinux:9
|
3 |
+
|
4 |
+
%post
|
5 |
+
# Create the app directory at the top level of the container's filesystem
|
6 |
+
mkdir -p /app && \
|
7 |
+
|
8 |
+
# Install EPEL repository and update the system
|
9 |
+
dnf update -y && \
|
10 |
+
dnf install -y epel-release && \
|
11 |
+
dnf update -y && \
|
12 |
+
/usr/bin/crb enable && \
|
13 |
+
dnf groupinstall -y "Development Tools" && \
|
14 |
+
|
15 |
+
# Install additional dependencies
|
16 |
+
dnf install -y --allowerasing \
|
17 |
+
ca-certificates \
|
18 |
+
git \
|
19 |
+
curl \
|
20 |
+
wget \
|
21 |
+
tmux \
|
22 |
+
htop \
|
23 |
+
nano \
|
24 |
+
vim \
|
25 |
+
gcc \
|
26 |
+
gcc-c++ \
|
27 |
+
cmake \
|
28 |
+
make \
|
29 |
+
readline-devel \
|
30 |
+
ncurses-devel \
|
31 |
+
openssl-devel \
|
32 |
+
sqlite-devel \
|
33 |
+
gdbm-devel \
|
34 |
+
glibc \
|
35 |
+
glibc-devel \
|
36 |
+
gtk2-devel \
|
37 |
+
libffi-devel \
|
38 |
+
libpq-devel \
|
39 |
+
openblas-devel \
|
40 |
+
libpng-devel \
|
41 |
+
jasper-devel \
|
42 |
+
openexr-devel \
|
43 |
+
libwebp-devel \
|
44 |
+
libjpeg-turbo-devel \
|
45 |
+
libtiff-devel \
|
46 |
+
tbb-devel \
|
47 |
+
libv4l-devel \
|
48 |
+
eigen3-devel \
|
49 |
+
freeglut-devel \
|
50 |
+
mesa-libGL \
|
51 |
+
mesa-libGL-devel \
|
52 |
+
boost \
|
53 |
+
boost-thread \
|
54 |
+
boost-devel \
|
55 |
+
gstreamer1-plugins-base \
|
56 |
+
bzip2-devel \
|
57 |
+
libffi-devel \
|
58 |
+
libpq-devel \
|
59 |
+
xz-devel \
|
60 |
+
openblas-devel \
|
61 |
+
glib2 \
|
62 |
+
glib2-devel \
|
63 |
+
libdc1394-devel \
|
64 |
+
xine-lib-devel \
|
65 |
+
gstreamer1-plugins-base \
|
66 |
+
gstreamer1-devel \
|
67 |
+
qt5-qtbase-devel \
|
68 |
+
atlas-devel \
|
69 |
+
fdk-aac-free-devel \
|
70 |
+
lame-devel \
|
71 |
+
libtheora-devel \
|
72 |
+
libvorbis-devel \
|
73 |
+
xvidcore-devel \
|
74 |
+
opencore-amr-devel \
|
75 |
+
protobuf-devel \
|
76 |
+
protobuf-compiler \
|
77 |
+
libSM \
|
78 |
+
libXext \
|
79 |
+
tk-devel \
|
80 |
+
opencv \
|
81 |
+
opencv-devel \
|
82 |
+
ninja-build && \
|
83 |
+
dnf clean all && \
|
84 |
+
rm -rf /var/cache/dnf && \
|
85 |
+
|
86 |
+
# dnf install x264 x265 v4l-utils ffmpeg-devel
|
87 |
+
|
88 |
+
# Install Python 3.11 from the EPEL repository
|
89 |
+
dnf install -y python3.11 python3.11-devel python3-pip && \
|
90 |
+
|
91 |
+
# Create a symlink for python3 to point to python3.11
|
92 |
+
# alternatives --set python3 /usr/bin/python3.11 && \
|
93 |
+
|
94 |
+
# Create and activate virtual environment
|
95 |
+
python3.11 -m venv /app/virt_env && \
|
96 |
+
. /app/virt_env/bin/activate && \
|
97 |
+
|
98 |
+
# Upgrade pip
|
99 |
+
pip install --no-cache-dir --upgrade pip && \
|
100 |
+
|
101 |
+
# Install dependencies
|
102 |
+
echo "Installing Python dependencies..." && \
|
103 |
+
pip install --no-cache-dir torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121 && \
|
104 |
+
pip install --no-cache-dir cuda-python==12.1.0 lightning==2.3.3 mlflow==2.15.0 torchmetrics tensorboard pycocotools matplotlib opencv-python boto3 ipykernel psutil && \
|
105 |
+
pip install --no-cache-dir mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.3/index.html && \
|
106 |
+
pip install --no-cache-dir xformers==0.0.27 --index-url https://download.pytorch.org/whl/cu121
|
107 |
+
|
108 |
+
%environment
|
109 |
+
# Set the environment variable to activate the virtual environment by default
|
110 |
+
. /app/virt_env/bin/activate
|
111 |
+
|
112 |
+
%runscript
|
113 |
+
# Activate the virtual environment
|
114 |
+
. /app/virt_env/bin/activate && \
|
115 |
+
|
116 |
+
# Run the given command
|
117 |
+
exec "$@"
|
apptainer_def_files/py311_conda.def
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: continuumio/miniconda3
|
3 |
+
|
4 |
+
%post
|
5 |
+
TMPDIR=$(mktemp -d) conda create -n myenv python=3.11 pytorch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 pytorch-cuda=12.1 lightning=2.2.4 pycocotools matplotlib tensorboard mlflow cuda-cudart cuda-version=12 -c pytorch -c nvidia -c conda-forge -y
|
6 |
+
#conda create -n myenv python=3.10 numpy -c conda-forge -y
|
7 |
+
|
8 |
+
# Create a directory for environment scripts
|
9 |
+
mkdir -p /project/env
|
10 |
+
|
11 |
+
# Create a script to initialize conda, activate the environment, and then run the command
|
12 |
+
%environment
|
13 |
+
source activate myenv
|
14 |
+
|
15 |
+
%runscript
|
16 |
+
# Run the command using the script
|
17 |
+
source activate myenv
|
18 |
+
exec "$@"
|
apptainer_def_files/py311_novenv.def
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
#From: python:latest
|
3 |
+
#From: python:3.11-slim
|
4 |
+
From: python:3.11
|
5 |
+
|
6 |
+
%post
|
7 |
+
# Create the app directory
|
8 |
+
mkdir -p /app
|
9 |
+
|
10 |
+
# Upgrade pip
|
11 |
+
pip install --upgrade pip
|
12 |
+
|
13 |
+
# Install dependencies
|
14 |
+
echo "Installing Python dependencies..."
|
15 |
+
pip install --no-cache-dir torch torchvision torchaudio lightning tensorboard pycocotools matplotlib mlflow
|
16 |
+
|
17 |
+
%runscript
|
18 |
+
# Run the given command
|
19 |
+
exec "$@"
|
apptainer_def_files/py311_poetry.def
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: python:3.11
|
3 |
+
|
4 |
+
%environment
|
5 |
+
export DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
%post
|
8 |
+
apt-get update && \
|
9 |
+
apt-get install -y --no-install-recommends \
|
10 |
+
ca-certificates \
|
11 |
+
build-essential \
|
12 |
+
git \
|
13 |
+
curl \
|
14 |
+
wget \
|
15 |
+
tmux \
|
16 |
+
htop \
|
17 |
+
nano \
|
18 |
+
vim \
|
19 |
+
pipx \
|
20 |
+
libreadline-dev \
|
21 |
+
libncursesw5-dev \
|
22 |
+
libssl-dev \
|
23 |
+
libsqlite3-dev \
|
24 |
+
libgdbm-dev \
|
25 |
+
libc6-dev \
|
26 |
+
libbz2-dev \
|
27 |
+
libffi-dev \
|
28 |
+
libpq-dev \
|
29 |
+
liblzma-dev \
|
30 |
+
libopenblas-dev \
|
31 |
+
libgl1-mesa-dev \
|
32 |
+
libglib2.0-0 \
|
33 |
+
libsm6 \
|
34 |
+
libxext6 \
|
35 |
+
ffmpeg \
|
36 |
+
tk-dev \
|
37 |
+
ninja-build && \
|
38 |
+
apt-get clean && \
|
39 |
+
rm -rf /var/lib/apt/lists/*
|
40 |
+
|
41 |
+
#pipx ensurepath --global && \
|
42 |
+
#pipx install poetry
|
43 |
+
|
44 |
+
|
45 |
+
# Create the app directory at the top level of the container's filesystem
|
46 |
+
mkdir -p /app
|
47 |
+
|
48 |
+
# Navigate to the app directory
|
49 |
+
cd /app
|
50 |
+
|
51 |
+
# Create a virtual environment
|
52 |
+
python -m venv myenv
|
53 |
+
|
54 |
+
# Activate the virtual environment
|
55 |
+
. /app/myenv/bin/activate
|
56 |
+
|
57 |
+
# Upgrade pip
|
58 |
+
pip install --no-cache-dir --upgrade pip
|
59 |
+
|
60 |
+
pip install --no-cache-dir --upgrade poetry
|
61 |
+
poetry config virtualenvs.create false --local
|
62 |
+
|
63 |
+
%environment
|
64 |
+
# Set the environment variable to activate the virtual environment by default
|
65 |
+
. /app/myenv/bin/activate
|
66 |
+
poetry config virtualenvs.create false --local
|
67 |
+
|
68 |
+
%runscript
|
69 |
+
# Activate the virtual environment
|
70 |
+
. /app/myenv/bin/activate
|
71 |
+
poetry config virtualenvs.create false --local
|
72 |
+
|
73 |
+
# Run the given command
|
74 |
+
exec "$@"
|
apptainer_def_files/py311_torch.def
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: python:3.11
|
3 |
+
|
4 |
+
%environment
|
5 |
+
export DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
%post
|
8 |
+
apt-get update && \
|
9 |
+
apt-get install -y --no-install-recommends \
|
10 |
+
ca-certificates \
|
11 |
+
build-essential \
|
12 |
+
git \
|
13 |
+
curl \
|
14 |
+
wget \
|
15 |
+
tmux \
|
16 |
+
htop \
|
17 |
+
nano \
|
18 |
+
vim \
|
19 |
+
pipx \
|
20 |
+
libreadline-dev \
|
21 |
+
libncursesw5-dev \
|
22 |
+
libssl-dev \
|
23 |
+
libsqlite3-dev \
|
24 |
+
libgdbm-dev \
|
25 |
+
libc6-dev \
|
26 |
+
libbz2-dev \
|
27 |
+
libffi-dev \
|
28 |
+
libpq-dev \
|
29 |
+
liblzma-dev \
|
30 |
+
libopenblas-dev \
|
31 |
+
libgl1-mesa-dev \
|
32 |
+
libglib2.0-0 \
|
33 |
+
libsm6 \
|
34 |
+
libxext6 \
|
35 |
+
ffmpeg \
|
36 |
+
tk-dev \
|
37 |
+
ninja-build && \
|
38 |
+
apt-get update && \
|
39 |
+
apt-get full-upgrade -y && \
|
40 |
+
apt-get clean && \
|
41 |
+
rm -rf /var/lib/apt/lists/*
|
42 |
+
|
43 |
+
# Create the app directory at the top level of the container's filesystem
|
44 |
+
mkdir -p /app
|
45 |
+
|
46 |
+
# Navigate to the app directory
|
47 |
+
cd /app
|
48 |
+
|
49 |
+
# Create a virtual environment
|
50 |
+
python -m venv myenv
|
51 |
+
|
52 |
+
# Activate the virtual environment
|
53 |
+
. /app/myenv/bin/activate
|
54 |
+
|
55 |
+
# Upgrade pip
|
56 |
+
pip install --no-cache-dir --upgrade pip
|
57 |
+
|
58 |
+
# Install dependencies
|
59 |
+
echo "Installing Python dependencies..."
|
60 |
+
pip install --no-cache-dir torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121
|
61 |
+
pip install --no-cache-dir lightning==2.3.3 tensorboard pycocotools matplotlib mlflow==2.14.3 cuda-python torchmetrics opencv-python-headless boto3 ipykernel
|
62 |
+
pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.3/index.html
|
63 |
+
|
64 |
+
%environment
|
65 |
+
# Set the environment variable to activate the virtual environment by default
|
66 |
+
. /app/myenv/bin/activate
|
67 |
+
|
68 |
+
%runscript
|
69 |
+
# Activate the virtual environment
|
70 |
+
. /app/myenv/bin/activate
|
71 |
+
|
72 |
+
# Run the given command
|
73 |
+
exec "$@"
|
apptainer_def_files/py311_torch_alpine.def
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: alpine:latest
|
3 |
+
|
4 |
+
%environment
|
5 |
+
export PATH="$PATH:/usr/local/bin"
|
6 |
+
|
7 |
+
%post
|
8 |
+
mkdir /app
|
9 |
+
|
10 |
+
# Install Python and pip
|
11 |
+
apk add --update --no-cache python3
|
12 |
+
|
13 |
+
python3 -m venv /app/venv
|
14 |
+
|
15 |
+
# activate the virtual environment
|
16 |
+
. /app/venv/bin/activate
|
17 |
+
|
18 |
+
# Install dependencies
|
19 |
+
echo "Installing Python dependencies..."
|
20 |
+
# pip install numpy
|
21 |
+
pip install torch torchvision torchaudio lightning tensorboard pycocotools matplotlib
|
22 |
+
|
23 |
+
%runscript
|
24 |
+
. /app/venv/bin/activate
|
25 |
+
# echo "This is the runscript"
|
26 |
+
exec "$@"
|
apptainer_def_files/py311_torch_minimal.def
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
From: busybox:1.36.1-glibc
|
3 |
+
|
4 |
+
%environment
|
5 |
+
export PATH="$PATH:/usr/local/bin"
|
6 |
+
|
7 |
+
%post
|
8 |
+
mkdir -p /app
|
9 |
+
mkdir -p /usr/local/bin
|
10 |
+
|
11 |
+
# Download Python
|
12 |
+
wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz -O /app/python.tgz
|
13 |
+
tar -xzf /app/python.tgz -C /app
|
14 |
+
cd /app/Python-3.11.1
|
15 |
+
./configure --prefix=/usr/local
|
16 |
+
make
|
17 |
+
make install
|
18 |
+
|
19 |
+
# Install pip
|
20 |
+
wget https://bootstrap.pypa.io/get-pip.py -O /app/get-pip.py
|
21 |
+
python3 /app/get-pip.py
|
22 |
+
|
23 |
+
# Install dependencies
|
24 |
+
echo "Installing Python dependencies..."
|
25 |
+
python3 -m ensurepip --upgrade
|
26 |
+
python3 -m pip install numpy
|
27 |
+
# python3 -m pip install torch torchvision torchaudio lightning tensorboard pycocotools matplotlib
|
28 |
+
|
29 |
+
%runscript
|
30 |
+
echo "This is the runscript"
|
31 |
+
exec "$@"
|
apptainer_def_files/py311_torch_mpi.def
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
#From: python:latest
|
3 |
+
From: python:3.11-slim
|
4 |
+
|
5 |
+
%environment
|
6 |
+
# Point to OMPI binaries, libraries, man pages
|
7 |
+
export OMPI_DIR=/opt/ompi
|
8 |
+
export PATH="$OMPI_DIR/bin:$PATH"
|
9 |
+
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"
|
10 |
+
export MANPATH="$OMPI_DIR/share/man:$MANPATH"
|
11 |
+
|
12 |
+
%post
|
13 |
+
echo "Installing required packages..."
|
14 |
+
apt-get update && apt-get install -y wget git bash gcc gfortran g++ make file bzip2
|
15 |
+
|
16 |
+
echo "Installing Open MPI"
|
17 |
+
export OMPI_DIR=/opt/ompi
|
18 |
+
export OMPI_VERSION=4.1.5
|
19 |
+
export OMPI_URL="https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-$OMPI_VERSION.tar.bz2"
|
20 |
+
mkdir -p /tmp/ompi
|
21 |
+
mkdir -p /opt
|
22 |
+
# Download
|
23 |
+
cd /tmp/ompi && wget -O openmpi-$OMPI_VERSION.tar.bz2 $OMPI_URL && tar -xjf openmpi-$OMPI_VERSION.tar.bz2
|
24 |
+
# Compile and install
|
25 |
+
cd /tmp/ompi/openmpi-$OMPI_VERSION && ./configure --prefix=$OMPI_DIR && make -j$(nproc) install
|
26 |
+
|
27 |
+
# Set env variables so we can compile our application
|
28 |
+
export PATH=$OMPI_DIR/bin:$PATH
|
29 |
+
export LD_LIBRARY_PATH=$OMPI_DIR/lib:$LD_LIBRARY_PATH
|
30 |
+
|
31 |
+
# Clean up
|
32 |
+
apt-get clean
|
33 |
+
rm -rf /var/lib/apt/lists/*
|
34 |
+
rm -rf /tmp/*
|
35 |
+
|
36 |
+
# Set up the virtual environment
|
37 |
+
mkdir /app
|
38 |
+
|
39 |
+
python -m venv /app/venv
|
40 |
+
|
41 |
+
# activate the virtual environment
|
42 |
+
. /app/venv/bin/activate
|
43 |
+
|
44 |
+
# Install dependencies
|
45 |
+
echo "Installing Python dependencies..."
|
46 |
+
# pip install --no-cache-dir pycocotools
|
47 |
+
pip install --no-cache-dir torch torchvision torchaudio lightning tensorboard pycocotools matplotlib
|
48 |
+
|
49 |
+
%runscript
|
50 |
+
. /app/venv/bin/activate
|
51 |
+
# echo "This is the runscript"
|
52 |
+
exec "$@"
|
apptainer_def_files/py311_torch_srun.def
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bootstrap: docker
|
2 |
+
#From: python:latest
|
3 |
+
From: python:3.11-slim
|
4 |
+
|
5 |
+
%post
|
6 |
+
mkdir -p /opt
|
7 |
+
echo "Installing required packages..."
|
8 |
+
apt-get update && apt-get install -y libc6 libhdf5-103-1 libhdf5-hl-100 liblz4-1 libreadline8 slurm-wlm-basic-plugins munge
|
9 |
+
|
10 |
+
# Clean up
|
11 |
+
apt-get clean
|
12 |
+
#rm -rf /var/lib/apt/lists/*
|
13 |
+
#rm -rf /tmp/*
|
14 |
+
|
15 |
+
# Set up the virtual environment
|
16 |
+
mkdir /app
|
17 |
+
|
18 |
+
python -m venv /app/venv
|
19 |
+
|
20 |
+
# activate the virtual environment
|
21 |
+
. /app/venv/bin/activate
|
22 |
+
|
23 |
+
# Install dependencies
|
24 |
+
echo "Installing Python dependencies..."
|
25 |
+
# pip install --no-cache-dir pycocotools
|
26 |
+
pip install --no-cache-dir torch torchvision torchaudio lightning tensorboard pycocotools matplotlib
|
27 |
+
|
28 |
+
%runscript
|
29 |
+
. /app/venv/bin/activate
|
30 |
+
# echo "This is the runscript"
|
31 |
+
exec "$@"
|
docker/Dockerfile
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.11
|
2 |
+
|
3 |
+
# Install necessary packages
|
4 |
+
RUN apt-get update && \
|
5 |
+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
6 |
+
git \
|
7 |
+
curl \
|
8 |
+
build-essential \
|
9 |
+
pipx \
|
10 |
+
tmux \
|
11 |
+
htop \
|
12 |
+
nano \
|
13 |
+
vim \
|
14 |
+
ninja-build && \
|
15 |
+
apt-get clean && \
|
16 |
+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
17 |
+
|
18 |
+
# Add ssh-ccdb function to .bashrc to connect to CCDB servers (cedar, beluga, narval)
|
19 |
+
RUN echo 'ssh-ccdb() {\n local server\n case $1 in\n cedar)\n server="cedar.alliancecan.ca"\n ;;\n beluga)\n server="beluga.alliancecan.ca"\n ;;\n narval)\n server="narval.alliancecan.ca"\n ;;\n *)\n echo "Usage: ssh-ccdb {cedar|beluga|narval}"\n return 1\n ;;\n esac\n ssh mka267@$server\n}' >> ~/.bashrc
|
20 |
+
|
21 |
+
# Enable color support for ls and grep in .bashrc
|
22 |
+
RUN echo 'if [ -x /usr/bin/dircolors ]; then\n eval "$(dircolors -b)"\n alias ls="ls --color=auto"\n alias grep="grep --color=auto"\n alias fgrep="fgrep --color=auto"\n alias egrep="egrep --color=auto"\nfi' >> ~/.bashrc
|
23 |
+
|
24 |
+
# Add custom colored prompt to .bashrc
|
25 |
+
RUN echo 'PS1="\\[\\e[0;32m\\]\\u@\\h\\[\\e[m\\]:\\[\\e[0;34m\\]\\w\\[\\e[m\\]\\$ "' >> ~/.bashrc
|
26 |
+
|
27 |
+
# Enable colored output for less in .bashrc
|
28 |
+
RUN echo 'export LESS=" -R"' >> ~/.bashrc
|
29 |
+
|
30 |
+
# Enable git prompt support if available
|
31 |
+
#RUN echo 'if [ -f /usr/share/git/completion/git-prompt.sh ]; then\n . /usr/share/git/completion/git-prompt.sh\n PS1="\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\W$(__git_ps1 \" (%s)\")\\[\\e[0m\\]]\\$ "\nfi' >> ~/.bashrc
|
32 |
+
|
33 |
+
# Enable color in the prompt for bash >= 4.0
|
34 |
+
RUN echo 'force_color_prompt=yes\nif [ -n "$force_color_prompt" ]; then\n if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then\n color_prompt=yes\n else\n color_prompt=\n fi\nfi\n\nif [ "$color_prompt" = yes ]; then\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ "\nelse\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\u@\\h:\\w\\$ "\nfi\nunset color_prompt force_color_prompt' >> ~/.bashrc
|
35 |
+
|
36 |
+
# Install VSCode CLI
|
37 |
+
RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" \
|
38 |
+
--output /tmp/vscode-cli.tar.gz && \
|
39 |
+
tar -xf /tmp/vscode-cli.tar.gz -C /usr/bin && \
|
40 |
+
rm /tmp/vscode-cli.tar.gz
|
41 |
+
|
42 |
+
# Create a virtual environment and install PyTorch
|
43 |
+
# RUN python -m venv /home/venv && \
|
44 |
+
# . /home/venv/bin/activate && \
|
45 |
+
RUN pip install --upgrade pip && \
|
46 |
+
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 && \
|
47 |
+
pip install --no-cache-dir lightning \
|
48 |
+
tensorboard \
|
49 |
+
pycocotools \
|
50 |
+
matplotlib \
|
51 |
+
mlflow \
|
52 |
+
cuda-python \
|
53 |
+
torchmetrics \
|
54 |
+
ipykernel \
|
55 |
+
opencv-python-headless
|
56 |
+
|
57 |
+
RUN git config --global user.email "[email protected]" && \
|
58 |
+
git config --global user.name "Masoud KA"
|
59 |
+
|
60 |
+
# Ensure the virtual environment is activated when the container starts
|
61 |
+
# ENV VIRTUAL_ENV=/home/venv
|
62 |
+
# ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
63 |
+
|
64 |
+
# CMD ["code", "tunnel"]
|
docker/Dockerfile_conda
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM continuumio/miniconda3
|
2 |
+
|
3 |
+
# Install necessary packages
|
4 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y --no-install-recommends \
|
7 |
+
ca-certificates \
|
8 |
+
software-properties-common \
|
9 |
+
git \
|
10 |
+
git-lfs \
|
11 |
+
curl \
|
12 |
+
build-essential \
|
13 |
+
unzip \
|
14 |
+
tmux \
|
15 |
+
htop \
|
16 |
+
nano \
|
17 |
+
vim \
|
18 |
+
less \
|
19 |
+
pipx \
|
20 |
+
libreadline-dev \
|
21 |
+
libncursesw5-dev \
|
22 |
+
libssl-dev \
|
23 |
+
libsqlite3-dev \
|
24 |
+
libgdbm-dev \
|
25 |
+
libc6-dev \
|
26 |
+
libbz2-dev \
|
27 |
+
libffi-dev \
|
28 |
+
libpq-dev \
|
29 |
+
liblzma-dev \
|
30 |
+
libopenblas-dev \
|
31 |
+
libgl1-mesa-dev \
|
32 |
+
libglib2.0-0 \
|
33 |
+
libsm6 \
|
34 |
+
libxext6 \
|
35 |
+
ffmpeg \
|
36 |
+
tk-dev \
|
37 |
+
direnv \
|
38 |
+
ansible \
|
39 |
+
jq \
|
40 |
+
ninja-build && \
|
41 |
+
apt-get clean && \
|
42 |
+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
43 |
+
|
44 |
+
# Create /root/.ssh directory
|
45 |
+
RUN mkdir -p /root/.ssh
|
46 |
+
|
47 |
+
RUN conda config --set auto_activate_base false
|
48 |
+
|
49 |
+
RUN pipx ensurepath && \
|
50 |
+
pipx install poetry
|
51 |
+
|
52 |
+
# Install pyenv
|
53 |
+
RUN curl https://pyenv.run | bash
|
54 |
+
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
|
55 |
+
RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
|
56 |
+
RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
|
57 |
+
|
58 |
+
RUN pip install --upgrade pip
|
59 |
+
RUN pip install --no-cache-dir poetry ansible keyring yq sagecipher awscli pyasyncore
|
60 |
+
|
61 |
+
# Add ssh-ccdb function to .bashrc to connect to CCDB servers (cedar, beluga, narval)
|
62 |
+
RUN echo 'ssh-ccdb() {\n local server\n case $1 in\n cedar)\n server="cedar.alliancecan.ca"\n ;;\n beluga)\n server="beluga.alliancecan.ca"\n ;;\n narval)\n server="narval.alliancecan.ca"\n ;;\n *)\n echo "Usage: ssh-ccdb {cedar|beluga|narval}"\n return 1\n ;;\n esac\n ssh mka267@$server\n}' >> ~/.bashrc
|
63 |
+
|
64 |
+
# Enable color support for ls and grep in .bashrc
|
65 |
+
RUN echo 'if [ -x /usr/bin/dircolors ]; then\n eval "$(dircolors -b)"\n alias ls="ls --color=auto"\n alias grep="grep --color=auto"\n alias fgrep="fgrep --color=auto"\n alias egrep="egrep --color=auto"\nfi' >> ~/.bashrc
|
66 |
+
|
67 |
+
# Add custom colored prompt to .bashrc
|
68 |
+
RUN echo 'PS1="\\[\\e[0;32m\\]\\u@\\h\\[\\e[m\\]:\\[\\e[0;34m\\]\\w\\[\\e[m\\]\\$ "' >> ~/.bashrc
|
69 |
+
|
70 |
+
# Enable colored output for less in .bashrc
|
71 |
+
RUN echo 'export LESS=" -R"' >> ~/.bashrc
|
72 |
+
|
73 |
+
# Enable git prompt support if available
|
74 |
+
# RUN echo 'if [ -f /usr/share/git/completion/git-prompt.sh ]; then\n . /usr/share/git/completion/git-prompt.sh\n PS1="\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\W$(__git_ps1 \" (%s)\")\\[\\e[0m\\]]\\$ "\nfi' >> ~/.bashrc
|
75 |
+
|
76 |
+
# Enable color in the prompt for bash >= 4.0
|
77 |
+
RUN echo 'force_color_prompt=yes\nif [ -n "$force_color_prompt" ]; then\n if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then\n color_prompt=yes\n else\n color_prompt=\n fi\nfi\n\nif [ "$color_prompt" = yes ]; then\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ "\nelse\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\u@\\h:\\w\\$ "\nfi\nunset color_prompt force_color_prompt' >> ~/.bashrc
|
78 |
+
|
79 |
+
# Install VSCode CLI
|
80 |
+
RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" \
|
81 |
+
--output /tmp/vscode-cli.tar.gz && \
|
82 |
+
tar -xf /tmp/vscode-cli.tar.gz -C /usr/bin && \
|
83 |
+
rm /tmp/vscode-cli.tar.gz
|
84 |
+
|
85 |
+
RUN git config --global user.email "[email protected]" && \
|
86 |
+
git config --global user.name "Masoud KA"
|
87 |
+
|
88 |
+
# CMD ["code", "tunnel"]
|
docker/Dockerfile_python
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.12
|
2 |
+
|
3 |
+
# Install necessary packages
|
4 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y --no-install-recommends \
|
7 |
+
ca-certificates \
|
8 |
+
build-essential \
|
9 |
+
git \
|
10 |
+
curl \
|
11 |
+
tmux \
|
12 |
+
htop \
|
13 |
+
nano \
|
14 |
+
vim \
|
15 |
+
pipx \
|
16 |
+
libreadline-dev \
|
17 |
+
libncursesw5-dev \
|
18 |
+
libssl-dev \
|
19 |
+
libsqlite3-dev \
|
20 |
+
libgdbm-dev \
|
21 |
+
libc6-dev \
|
22 |
+
libbz2-dev \
|
23 |
+
libffi-dev \
|
24 |
+
libpq-dev \
|
25 |
+
liblzma-dev \
|
26 |
+
libopenblas-dev \
|
27 |
+
libgl1-mesa-dev \
|
28 |
+
libglib2.0-0 \
|
29 |
+
libsm6 \
|
30 |
+
libxext6 \
|
31 |
+
ffmpeg \
|
32 |
+
tk-dev \
|
33 |
+
ninja-build && \
|
34 |
+
apt-get clean && \
|
35 |
+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
36 |
+
|
37 |
+
RUN pipx ensurepath
|
38 |
+
|
39 |
+
RUN pipx install poetry && \
|
40 |
+
pipx install virtualenv && \
|
41 |
+
pipx install pipenv
|
42 |
+
|
43 |
+
|
44 |
+
# Install VSCode CLI
|
45 |
+
RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" \
|
46 |
+
--output /tmp/vscode-cli.tar.gz && \
|
47 |
+
tar -xf /tmp/vscode-cli.tar.gz -C /usr/bin && \
|
48 |
+
rm /tmp/vscode-cli.tar.gz
|
49 |
+
|
50 |
+
|
51 |
+
# Install miniconda
|
52 |
+
ENV CONDA_DIR=/opt/conda
|
53 |
+
|
54 |
+
RUN curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
55 |
+
/bin/bash ~/miniconda.sh -b -p /opt/conda
|
56 |
+
|
57 |
+
# Put conda in path
|
58 |
+
ENV PATH=$CONDA_DIR/bin:$PATH
|
59 |
+
|
60 |
+
RUN rm ~/miniconda.sh
|
61 |
+
|
62 |
+
RUN conda init bash
|
63 |
+
RUN conda config --set auto_activate_base false
|
64 |
+
|
65 |
+
# Add ssh-ccdb function to .bashrc to connect to CCDB servers (cedar, beluga, narval)
|
66 |
+
RUN echo 'ssh-ccdb() {\n local server\n case $1 in\n cedar)\n server="cedar.alliancecan.ca"\n ;;\n beluga)\n server="beluga.alliancecan.ca"\n ;;\n narval)\n server="narval.alliancecan.ca"\n ;;\n *)\n echo "Usage: ssh-ccdb {cedar|beluga|narval}"\n return 1\n ;;\n esac\n ssh mka267@$server\n}' >> ~/.bashrc
|
67 |
+
|
68 |
+
# Enable color support for ls and grep in .bashrc
|
69 |
+
RUN echo 'if [ -x /usr/bin/dircolors ]; then\n eval "$(dircolors -b)"\n alias ls="ls --color=auto"\n alias grep="grep --color=auto"\n alias fgrep="fgrep --color=auto"\n alias egrep="egrep --color=auto"\nfi' >> ~/.bashrc
|
70 |
+
|
71 |
+
# Add custom colored prompt to .bashrc
|
72 |
+
RUN echo 'PS1="\\[\\e[0;32m\\]\\u@\\h\\[\\e[m\\]:\\[\\e[0;34m\\]\\w\\[\\e[m\\]\\$ "' >> ~/.bashrc
|
73 |
+
|
74 |
+
# Enable colored output for less in .bashrc
|
75 |
+
RUN echo 'export LESS=" -R"' >> ~/.bashrc
|
76 |
+
|
77 |
+
# Enable git prompt support if available
|
78 |
+
# RUN echo 'if [ -f /usr/share/git/completion/git-prompt.sh ]; then\n . /usr/share/git/completion/git-prompt.sh\n PS1="\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\W$(__git_ps1 \" (%s)\")\\[\\e[0m\\]]\\$ "\nfi' >> ~/.bashrc
|
79 |
+
|
80 |
+
# Enable color in the prompt for bash >= 4.0
|
81 |
+
RUN echo 'force_color_prompt=yes\nif [ -n "$force_color_prompt" ]; then\n if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then\n color_prompt=yes\n else\n color_prompt=\n fi\nfi\n\nif [ "$color_prompt" = yes ]; then\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ "\nelse\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\u@\\h:\\w\\$ "\nfi\nunset color_prompt force_color_prompt' >> ~/.bashrc
|
82 |
+
|
83 |
+
RUN git config --global user.email "[email protected]" && \
|
84 |
+
git config --global user.name "Masoud KA"
|
85 |
+
|
86 |
+
# CMD ["code", "tunnel"]
|
docker/Dockerfile_ubuntu
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:24.04
|
2 |
+
|
3 |
+
# Install necessary packages
|
4 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y --no-install-recommends \
|
7 |
+
ca-certificates \
|
8 |
+
less \
|
9 |
+
wget \
|
10 |
+
gpustat \
|
11 |
+
git \
|
12 |
+
curl \
|
13 |
+
build-essential \
|
14 |
+
tmux \
|
15 |
+
htop \
|
16 |
+
nano \
|
17 |
+
vim \
|
18 |
+
pipx \
|
19 |
+
libreadline-dev \
|
20 |
+
libncursesw5-dev \
|
21 |
+
libssl-dev \
|
22 |
+
libsqlite3-dev \
|
23 |
+
libgdbm-dev \
|
24 |
+
libc6-dev \
|
25 |
+
libbz2-dev \
|
26 |
+
libffi-dev \
|
27 |
+
libpq-dev \
|
28 |
+
liblzma-dev \
|
29 |
+
libopenblas-dev \
|
30 |
+
libgl1-mesa-dev \
|
31 |
+
libglib2.0-0 \
|
32 |
+
libsm6 \
|
33 |
+
libxext6 \
|
34 |
+
ffmpeg \
|
35 |
+
tk-dev \
|
36 |
+
ninja-build && \
|
37 |
+
apt-get clean && \
|
38 |
+
rm -rf /var/lib/apt/lists/*
|
39 |
+
|
40 |
+
# Create /root/.ssh directory
|
41 |
+
RUN mkdir -p /root/.ssh
|
42 |
+
|
43 |
+
# Install miniconda
|
44 |
+
ENV CONDA_DIR=/opt/conda
|
45 |
+
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
|
46 |
+
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
|
47 |
+
rm ~/miniconda.sh
|
48 |
+
|
49 |
+
# Put conda in path so we can use conda activate
|
50 |
+
ENV PATH=$CONDA_DIR/bin:$PATH
|
51 |
+
|
52 |
+
# Initialize conda
|
53 |
+
RUN conda init bash
|
54 |
+
RUN conda config --set auto_activate_base false
|
55 |
+
|
56 |
+
# Install VSCode CLI
|
57 |
+
RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" \
|
58 |
+
--output /tmp/vscode-cli.tar.gz && \
|
59 |
+
tar -xf /tmp/vscode-cli.tar.gz -C /usr/bin && \
|
60 |
+
rm /tmp/vscode-cli.tar.gz
|
61 |
+
|
62 |
+
RUN pipx ensurepath && \
|
63 |
+
pipx install poetry && \
|
64 |
+
pipx install virtualenv && \
|
65 |
+
pipx install pipenv
|
66 |
+
|
67 |
+
# Add ssh-ccdb function to .bashrc to connect to CCDB servers (cedar, beluga, narval)
|
68 |
+
RUN echo 'ssh-ccdb() {\n local server\n case $1 in\n cedar)\n server="cedar.alliancecan.ca"\n ;;\n beluga)\n server="beluga.alliancecan.ca"\n ;;\n narval)\n server="narval.alliancecan.ca"\n ;;\n *)\n echo "Usage: ssh-ccdb {cedar|beluga|narval}"\n return 1\n ;;\n esac\n ssh mka267@$server\n}' >> ~/.bashrc
|
69 |
+
|
70 |
+
# Enable color support for ls and grep in .bashrc
|
71 |
+
RUN echo 'if [ -x /usr/bin/dircolors ]; then\n eval "$(dircolors -b)"\n alias ls="ls --color=auto"\n alias grep="grep --color=auto"\n alias fgrep="fgrep --color=auto"\n alias egrep="egrep --color=auto"\nfi' >> ~/.bashrc
|
72 |
+
|
73 |
+
# Add custom colored prompt to .bashrc
|
74 |
+
RUN echo 'PS1="\\[\\e[0;32m\\]\\u@\\h\\[\\e[m\\]:\\[\\e[0;34m\\]\\w\\[\\e[m\\]\\$ "' >> ~/.bashrc
|
75 |
+
|
76 |
+
# Enable colored output for less in .bashrc
|
77 |
+
RUN echo 'export LESS=" -R"' >> ~/.bashrc
|
78 |
+
|
79 |
+
# Enable git prompt support if available
|
80 |
+
# RUN echo 'if [ -f /usr/share/git/completion/git-prompt.sh ]; then\n . /usr/share/git/completion/git-prompt.sh\n PS1="\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\W$(__git_ps1 \" (%s)\")\\[\\e[0m\\]]\\$ "\nfi' >> ~/.bashrc
|
81 |
+
|
82 |
+
# Enable color in the prompt for bash >= 4.0
|
83 |
+
RUN echo 'force_color_prompt=yes\nif [ -n "$force_color_prompt" ]; then\n if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then\n color_prompt=yes\n else\n color_prompt=\n fi\nfi\n\nif [ "$color_prompt" = yes ]; then\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ "\nelse\n PS1="\\${debian_chroot:+(\$debian_chroot)}\\u@\\h:\\w\\$ "\nfi\nunset color_prompt force_color_prompt' >> ~/.bashrc
|
84 |
+
|
85 |
+
RUN git config --global user.email "[email protected]" && \
|
86 |
+
git config --global user.name "Masoud KA"
|
87 |
+
|
88 |
+
# CMD ["code", "tunnel"]
|