apptainer_docker_files / docker /Dockerfile_conda
Masoud KA
Initial Commit
b111f5d
FROM continuumio/miniconda3
# Install necessary packages
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
software-properties-common \
git \
git-lfs \
curl \
build-essential \
unzip \
tmux \
htop \
nano \
vim \
less \
pipx \
libreadline-dev \
libncursesw5-dev \
libssl-dev \
libsqlite3-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
libffi-dev \
libpq-dev \
liblzma-dev \
libopenblas-dev \
libgl1-mesa-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
ffmpeg \
tk-dev \
direnv \
ansible \
jq \
ninja-build && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create /root/.ssh directory
RUN mkdir -p /root/.ssh
RUN conda config --set auto_activate_base false
RUN pipx ensurepath && \
pipx install poetry
# Install pyenv
RUN curl https://pyenv.run | bash
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
RUN pip install --upgrade pip
RUN pip install --no-cache-dir poetry ansible keyring yq sagecipher awscli pyasyncore
# Add ssh-ccdb function to .bashrc to connect to CCDB servers (cedar, beluga, narval)
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
# Enable color support for ls and grep in .bashrc
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
# Add custom colored prompt to .bashrc
RUN echo 'PS1="\\[\\e[0;32m\\]\\u@\\h\\[\\e[m\\]:\\[\\e[0;34m\\]\\w\\[\\e[m\\]\\$ "' >> ~/.bashrc
# Enable colored output for less in .bashrc
RUN echo 'export LESS=" -R"' >> ~/.bashrc
# Enable git prompt support if available
# 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
# Enable color in the prompt for bash >= 4.0
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
# Install VSCode CLI
RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" \
--output /tmp/vscode-cli.tar.gz && \
tar -xf /tmp/vscode-cli.tar.gz -C /usr/bin && \
rm /tmp/vscode-cli.tar.gz
RUN git config --global user.email "[email protected]" && \
git config --global user.name "Masoud KA"
# CMD ["code", "tunnel"]