generated from coderefinery/TTT4HPC_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
160 additions
and
4 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
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,26 @@ | ||
Bootstrap: docker | ||
From: ubuntu:latest | ||
|
||
%post | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt-get update -y | ||
|
||
apt install -y git build-essential pkg-config | ||
apt install -y libz-dev libbz2-dev liblzma-dev libcurl4-openssl-dev libssl-dev libgsl-dev | ||
|
||
git clone --recursive https://github.com/someuser/sometool.git | ||
cd sometool | ||
|
||
make | ||
|
||
%files | ||
# Workaround to fix dependency on fancylib | ||
/home/myself/fancylib /usr/lib/fancylib | ||
|
||
%environment | ||
export LC_ALL=C | ||
|
||
%runscript | ||
export PATH=/sometool:$PATH | ||
|
||
$@ |
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,46 @@ | ||
Bootstrap: docker | ||
From: ubuntu:latest | ||
|
||
%post | ||
# Set environment variables | ||
export VIRTUAL_ENV=/app/venv | ||
|
||
# Install system dependencies and Python 3 | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
libgomp1 \ | ||
python3 \ | ||
python3-venv \ | ||
python3-distutils \ | ||
python3-pip && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set up the virtual environment | ||
python3 -m venv $VIRTUAL_ENV | ||
. $VIRTUAL_ENV/bin/activate | ||
|
||
# Install Python libraries | ||
pip install --no-cache-dir --upgrade pip && \ | ||
pip install --no-cache-dir -r /app/requirements.txt | ||
|
||
%files | ||
# Copy project files | ||
./requirements.txt /app/requirements.txt | ||
./app.py /app/app.py | ||
# Copy data | ||
/home/myself/data /app/data | ||
# Workaround to fix dependency on fancylib | ||
/home/myself/fancylib /usr/lib/fancylib | ||
|
||
%environment | ||
# Set the environment variables | ||
export LANG=C.UTF-8 LC_ALL=C.UTF-8 | ||
export VIRTUAL_ENV=/app/venv | ||
|
||
%runscript | ||
# Activate the virtual environment | ||
. $VIRTUAL_ENV/bin/activate | ||
# Run the application | ||
python /app/app.py |