ThibaultFy commited on
Commit
6fb4b78
·
1 Parent(s): 77aeb35

Update substra_launcher.py

Browse files
Files changed (1) hide show
  1. substra_launcher.py +9 -5
substra_launcher.py CHANGED
@@ -19,15 +19,19 @@ async def launch_substra_space(
19
  folder_path="./substra_template/"
20
  )
21
 
22
- ENV_FILE = f"""\
23
- SUBSTRA_ORG1_DISTR={hospital_a / 100}
24
- SUBSTRA_ORG2_DISTR={hospital_b / 100}\
 
 
 
 
25
  """
26
 
27
  hf_api.upload_file(
28
  repo_id=repo_id,
29
- path_or_fileobj=ENV_FILE.encode(),
30
- path_in_repo="substra_template/.env",
31
  repo_type="space",
32
  )
33
 
 
19
  folder_path="./substra_template/"
20
  )
21
 
22
+ DOCKER_FILE = f"""\
23
+ FROM ghcr.io/substra/substrafl:substra-hf-demo
24
+
25
+ ENV SUBSTRA_ORG1_DISTR={hospital_a / 100}
26
+ ENV SUBSTRA_ORG2_DISTR={hospital_b / 100}
27
+
28
+ CMD ["bash", "docker-run.sh"]\
29
  """
30
 
31
  hf_api.upload_file(
32
  repo_id=repo_id,
33
+ path_or_fileobj=DOCKER_FILE.encode(),
34
+ path_in_repo="substra_template/Dockerfile",
35
  repo_type="space",
36
  )
37