-
Notifications
You must be signed in to change notification settings - Fork 0
/
diffusion.def
37 lines (27 loc) · 1.01 KB
/
diffusion.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
BootStrap: docker
From: ubuntu:22.04
%files
./pyproject.toml /virtualenvs/pyproject.toml
./poetry.lock /virtualenvs/pyproject.lock
%post
# Ubuntuのパッケージリストを更新
export DEBIAN_FRONTEND=noninteractive
cd /virtualenvs
apt-get update
# 必要なパッケージをインストール
apt-get install -y python3 python3-pip python3-venv curl git libaio-dev tcl environment-modules
git clone https://github.com/pyenv/pyenv.git /root/.pyenv
export PYENV_ROOT="/root/.pyenv"
export PATH="/root/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
pyenv install 3.10.12 && pyenv global 3.10.12
# Poetryをインストール
curl -sSL https://install.python-poetry.org | python3 -
export PATH=/root/.local/bin:$PATH
poetry config virtualenvs.in-project true
poetry install
%environment
export PYENV_ROOT="/root/.pyenv"
export PATH="/root/.pyenv/bin:$PATH"
export PATH=/root/.local/bin:$PATH
export PATH="/virtualenvs/.venv/bin:$PATH"