Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions docs/source/code/hpc_container.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Bootstrap: docker
From: ubuntu:26.04

%post
export DEBIAN_FRONTEND=noninteractive
set -e

apt-get update && apt-get install -y \
tzdata \
wget \
unzip \
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
curl \
libncursesw5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
liblzma-dev \
libegl1 \
libgl1 \
libglib2.0-0 \
libx11-6 \
libxext6 \
libxrender1 \
libxkbcommon-x11-0 \
libxcb1 \
libdbus-1-3 \
libxcb-cursor0 \
libxcb-xinerama0 \
libsm6 \
libice6 \
libglu1-mesa

ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata

# Clean apt caches
apt-get clean
rm -rf /var/lib/apt/lists/*

# -------------------------------
# Install Python 3.13 from source
# -------------------------------
cd /tmp
wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tgz
tar -xf Python-3.13.0.tgz
cd Python-3.13.0

./configure --enable-optimizations
make -j$(nproc)
make altinstall # installs as python3.13

# -------------------------------
# Create virtual environment
# -------------------------------
/usr/local/bin/python3.13 -m venv /opt/venv

# Activate and install packages
. /opt/venv/bin/activate
pip install --upgrade pip
pip install spinetoolbox

deactivate

# Remove Python build artifacts
cd /
rm -rf /tmp/Python-3.13.0*

# -------------------------------
# Install GAMS
# -------------------------------
cd /
wget https://d37drm4t2jghv5.cloudfront.net/distributions/53.5.1/linux/linux_x64_64_sfx.exe
chmod +x linux_x64_64_sfx.exe
./linux_x64_64_sfx.exe

mkdir -p /opt
mv /gams53.5_linux_x64_64_sfx /opt/gams53.5

rm linux_x64_64_sfx.exe

%environment
# Make "python" point to venv python
export PATH=/opt/venv/bin:/opt/gams53.5:$PATH
export QT_QPA_PLATFORM=offscreen
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
html_static_path = ["code"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
Loading
Loading