Switched from YAML to JSON, closing #8.
This commit is contained in:
parent
5a8d7905c6
commit
0841823096
@ -1,15 +0,0 @@
|
||||
artefact_url: "https://example.com/artifact.zip"
|
||||
type: "zip" # Possible values: zip, tgz
|
||||
doi: "XX.XXXX/XXXXXXX.XXXXXXX"
|
||||
dockerfiles:
|
||||
- name: "image1:version"
|
||||
location: "path/to/docker/folder"
|
||||
package_managers:
|
||||
- "dpkg" # Possible values: dpkg, rpm, pacman, pip, conda
|
||||
git_packages:
|
||||
- name: "pkg1"
|
||||
location: "path/to/git/repo"
|
||||
misc_packages:
|
||||
- name: "mpkg1"
|
||||
url: "https://example.com/package1.zip"
|
||||
type: "zip" # Possible values: zip, tgz
|
@ -0,0 +1,7 @@
|
||||
artifact_url: "https://zenodo.org/record/7508499/files/wsmoses/PolygeistGPU-Docker-v0.2.1.zip"
|
||||
type: "zip"
|
||||
doi: "10.1145/3572848.3577475"
|
||||
image_name: "polygeist:artefact"
|
||||
dockerfile_location: "wsmoses-PolygeistGPU-Docker-ba18197/MocCUDA"
|
||||
package_managers:
|
||||
- "dpkg"
|
@ -0,0 +1,8 @@
|
||||
artifact_url: "https://zenodo.org/record/7544675/files/SF2-code.tar.gz"
|
||||
type: "tgz"
|
||||
doi: "10.1145/3572848.3577480"
|
||||
image_name: "bdm-publication-image-v7"
|
||||
dockerfile_location: "bdm-paper-examples/docker"
|
||||
package_managers:
|
||||
- "dpkg"
|
||||
# Build done by running build.sh and not just docker build, but this is not implemented yet
|
@ -0,0 +1,8 @@
|
||||
artifact_url: "https://zenodo.org/record/7328505/files/tgopt-artifact.tgz"
|
||||
type: "tgz"
|
||||
doi: "10.1145/3572848.3577490"
|
||||
image_name: "tgopt:artefact"
|
||||
dockerfile_location: "tgopt-artifact"
|
||||
package_managers:
|
||||
- "dpkg"
|
||||
- "conda"
|
@ -0,0 +1,8 @@
|
||||
artifact_url: "https://zenodo.org/record/6632461/files/SC22_artifacts_submission.zip"
|
||||
type: "zip"
|
||||
doi: "10.5555/3571885.3571906"
|
||||
image_name: "taxo:artefact"
|
||||
dockerfile_location: "SC22_artifacts_submission"
|
||||
package_managers:
|
||||
- "dpkg"
|
||||
- "pip"
|
@ -0,0 +1,8 @@
|
||||
artifact_url: "https://zenodo.org/record/6926481/files/koparasy/HPAC-v0.0.0-Puppeteer.zip"
|
||||
type: "zip"
|
||||
doi: "10.5555/3571885.3571974"
|
||||
image_name: "puppeteer:artefact"
|
||||
dockerfile_location: "koparasy-HPAC-2723bb8/approx/puppeteer/container"
|
||||
package_managers:
|
||||
- "dpkg"
|
||||
- "pip"
|
@ -0,0 +1,7 @@
|
||||
artifact_url: "https://zenodo.org/record/7004393/files/deinsum/sc22-artifact-0.4.zip"
|
||||
type: "zip"
|
||||
doi: "10.5555/3571885.3571918"
|
||||
image_name: "deinsum:artefact-cpu"
|
||||
dockerfile_location: "deinsum-sc22-artifact-7559901/docker_cpu"
|
||||
package_managers:
|
||||
- "dpkg"
|
@ -0,0 +1,7 @@
|
||||
artifact_url: "https://zenodo.org/record/7004393/files/deinsum/sc22-artifact-0.4.zip"
|
||||
type: "zip"
|
||||
doi: "10.5555/3571885.3571918"
|
||||
image_name: "deinsum:artefact_gpu"
|
||||
dockerfile_location: "deinsum-sc22-artifact-7559901/docker_gpu"
|
||||
package_managers:
|
||||
- "dpkg"
|
20
artifacts_json/test.json
Normal file
20
artifacts_json/test.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"artifact_url": "http://localhost/artifact.zip",
|
||||
"type": "zip",
|
||||
"doi": "XX.XXXX/XXXXXXX.XXXXXXX",
|
||||
"image_name": "prog:latest",
|
||||
"dockerfile_location": "./",
|
||||
"package_managers": [
|
||||
"dpkg",
|
||||
"pip"
|
||||
],
|
||||
"git_packages": [{
|
||||
"name": "pkg1",
|
||||
"location": "/pkg1"
|
||||
}],
|
||||
"misc_packages": [{
|
||||
"name": "mpkg1",
|
||||
"url": "http://localhost/package1.zip",
|
||||
"type": "zip"
|
||||
}]
|
||||
}
|
27
ecg.py
27
ecg.py
@ -10,7 +10,7 @@
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
import yaml
|
||||
# import yaml
|
||||
import argparse
|
||||
import tempfile
|
||||
import os
|
||||
@ -85,7 +85,7 @@ def download_sources(config):
|
||||
Parameters
|
||||
----------
|
||||
config: dict
|
||||
Parsed YAML config file.
|
||||
Parsed config file.
|
||||
|
||||
Returns
|
||||
-------
|
||||
@ -143,7 +143,7 @@ def build_image(config, src_dir):
|
||||
Parameters
|
||||
----------
|
||||
config: dict
|
||||
Parsed YAML config file.
|
||||
Parsed config file.
|
||||
|
||||
src_dir: tempfile.TemporaryDirectory
|
||||
The directory where the artifact is stored.
|
||||
@ -176,7 +176,7 @@ def check_env(config, src_dir):
|
||||
Parameters
|
||||
----------
|
||||
config: dict
|
||||
Parsed YAML config file.
|
||||
Parsed config file.
|
||||
|
||||
src_dir: tempfile.TemporaryDirectory
|
||||
The directory where the artifact is stored.
|
||||
@ -222,7 +222,7 @@ def remove_image(config):
|
||||
Parameters
|
||||
----------
|
||||
config: dict
|
||||
Parsed YAML config file.
|
||||
Parsed config file.
|
||||
|
||||
Returns
|
||||
-------
|
||||
@ -282,18 +282,19 @@ def main():
|
||||
# file:
|
||||
print(f"Output will be stored in {log_path}")
|
||||
logging.basicConfig(filename = log_path, filemode = "w", format = '%(levelname)s: %(message)s', level = logging.INFO)
|
||||
|
||||
# Parsing the input YAML file including the configuration of
|
||||
# the artifact's image:
|
||||
config_path = args.config
|
||||
config_file = open(config_path, "r")
|
||||
config = yaml.safe_load(config_file)
|
||||
config_file.close()
|
||||
verbose = args.verbose
|
||||
|
||||
if verbose:
|
||||
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
|
||||
|
||||
# Parsing the input file including the configuration of the artifact's
|
||||
# image:
|
||||
config_path = args.config
|
||||
config_file = open(config_path, "r")
|
||||
config = json.loads(config_file.read())
|
||||
# config = yaml.safe_load(config_file)
|
||||
# print(config)
|
||||
config_file.close()
|
||||
|
||||
src_dir = download_sources(config)
|
||||
successful_build = build_image(config, src_dir)
|
||||
if successful_build:
|
||||
|
Loading…
x
Reference in New Issue
Block a user