Reputation: 347
I tried to build an apptainer image from the following definition file:
Bootstrap: docker
From: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
%files
./requirements.txt /src/requirements.txt
%post
apt -y update
apt -y install git libxml2-dev
%runscript
$@
But the build process prompts for entering the geographic area and then gets stuck.
Upvotes: 0
Views: 153
Reputation: 347
Inspired from an answer here, adding
TZ=Europe/Berlin
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
at the beginning of the %post section did the trick for me.
Final definition file:
Bootstrap: docker
From: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
%files
./requirements.txt /src/requirements.txt
%post
TZ=Europe/Berlin
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt -y update
apt -y install git libxml2-dev
%runscript
$@
Upvotes: 0