Skip to content

Commit

Permalink
#221 Fix variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Dana Singh authored and Dana Singh committed Jan 21, 2025
1 parent e19b630 commit bca152f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions fre/make/create_docker_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
from .gfdlfremake import varsfre, targetfre, yamlfre, buildDocker
import fre.yamltools.combine_yamls as cy

def dockerfile_write_steps(yaml_obj,img,run_env,target,td,cr,cb,cd):
def dockerfile_write_steps(yaml_obj,img,run_env,target,mkTemplate,td,cr,cb,cd):
"""
Go through steps to write the Dockerfile
"""
dockerBuild = buildDocker.container(base = img,
exp = yaml_obj["experiment"],
libs = yaml_obj["container_addlibs"],
RUNenv = run_env,
target = target)
target = target,
mkTemplate = mkTemplate)

dockerBuild.writeDockerfileCheckout("checkout.sh", td+"/checkout.sh")
dockerBuild.writeDockerfileMakefile(td+"/Makefile", td+"/linkline.sh")
Expand Down Expand Up @@ -81,10 +82,10 @@ def dockerfile_create(yamlfile,platform,target,execute,force_dockerfile):
curr_dir = os.getcwd()
if not os.path.exists(f"{curr_dir}/Dockerfile"):
dockerfile_write_steps(yaml_obj = fremakeYaml,
#makefile_obj = freMakefile,
img = image,
run_env = platform["RUNenv"],
target = targetObject,
mkTemplate = platform["mkTemplate"],
td = tmp_dir,
cr = platform["containerRun"],
cb = platform["containerBuild"],
Expand All @@ -98,13 +99,13 @@ def dockerfile_create(yamlfile,platform,target,execute,force_dockerfile):
# Create the checkout script
print("Re-creating Dockerfile...")
dockerfile_write_steps(yaml_obj = fremakeYaml,
# makefile_obj = freMakefile,
img = image,
run_env = RUNenv,
run_env = platform["RUNenv"],
target = targetObject,
mkTemplate = platform["mkTemplate"],
td = tmp_dir,
cr = containerRun,
cb = containerBuild,
cr = platform["containerRun"],
cb = platform["containerBuild"],
cd = curr_dir)
else:
print(f"Dockerfile PREVIOUSLY created here: {curr_dir}/Dockerfile")
Expand Down

0 comments on commit bca152f

Please sign in to comment.