Spaces:
Runtime error
Runtime error
Commit
·
6fb4b78
1
Parent(s):
77aeb35
Update substra_launcher.py
Browse files- 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 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
"""
|
26 |
|
27 |
hf_api.upload_file(
|
28 |
repo_id=repo_id,
|
29 |
-
path_or_fileobj=
|
30 |
-
path_in_repo="substra_template
|
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 |
|