Ai
23 Star 56 Fork 90

openEuler/hpcrunner
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
containerService.py 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
sunlock0653 提交于 2025-08-02 14:58 +08:00 . update netcdf-fortran
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from toolService import ToolService
from dataService import DataService
class ContainerService:
def __init__(self):
self.tool = ToolService()
self.data = DataService()
def gen_def(self, image):
config_file = self.data.get_config_file_name()
def_file_content = f'''BootStrap: docker
From: {image}
%environment
source /etc/profile || true
cd $JARVIS_ROOT
source env.sh
%post
# Install the necessary development environment
yum install -y environment-modules git dmidecode pciutils wget vim
# Install base gcc
yum install -y gcc gcc-c++ gcc-gfortran glibc-devel make libgfortran
# install network package
yum install -y tcsh tcl lsof tk bc
source /etc/profile || true
git config --global http.sslVerify false
git clone https://gitee.com/openeuler/hpcrunner
cd hpcrunner
source ./init.sh
# add your personal files here
# Switch config
./jarvis -use {config_file}
# download dependency
./jarvis -d
# install dependency
./jarvis -dp
# build hpc
./jarvis -b
# run hpc
./jarvis -r
# clean tmp directory
rm -rf downloads tmp
'''
def_file = config_file+'.def'
self.tool.write_file(def_file, def_file_content)
print(f'Singularity file {def_file} successfully generated!')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler/hpcrunner.git
git@gitee.com:openeuler/hpcrunner.git
openeuler
hpcrunner
hpcrunner
master

搜索帮助