Skip to content

Commit 693175b

Browse files
author
Obada Haddad
committed
fix error from previous commit
1 parent 6c1c590 commit 693175b

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

compute_worker/compute_worker.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@
5555
+ os.environ.get("CONTAINER_ENGINE_EXECUTABLE", "docker").upper()
5656
+ "with GPU capabilites : "
5757
+ os.environ.get("GPU_DEVICE", "nvidia.com/gpu=all")
58+
+ " network_disabled for the competition container is set to "
59+
+ os.environ.get("COMPETITION_CONTAINER_NETWORK_DISABLED", "False")
5860
)
5961
else:
6062
logger.info(
6163
"Using "
6264
+ os.environ.get("CONTAINER_ENGINE_EXECUTABLE", "docker").upper()
63-
+ " without GPU capabilities"
65+
+ " without GPU capabilities. "
66+
+ "network_disabled for the competition container is set to "
67+
+ os.environ.get("COMPETITION_CONTAINER_NETWORK_DISABLED", "False")
6468
)
6569

6670
if os.environ.get("CONTAINER_ENGINE_EXECUTABLE", "docker").lower() == "docker":
@@ -982,8 +986,8 @@ async def _run_program_directory(self, program_dir, kind):
982986
)
983987
# Disable or not the competition container access to Internet (False by default)
984988
container_network_status = os.environ.get(
985-
"COMPETITION_CONTAINER_NETWORK_DISABLED", "False"
986-
).title()
989+
"COMPETITION_CONTAINER_NETWORK_DISABLED", ""
990+
)
987991

988992
# HTTP and HTTPS proxy for the competition container if needed
989993
competition_container_proxy_http = os.environ.get(
@@ -1012,7 +1016,7 @@ async def _run_program_directory(self, program_dir, kind):
10121016
competition_container_proxy_http,
10131017
competition_container_proxy_https,
10141018
],
1015-
network_disabled=container_network_status,
1019+
network_disabled=container_network_status.lower() in ["true"],
10161020
)
10171021
logger.debug("Created container : " + str(container))
10181022
logger.info("Volume configuration of the container: ")

0 commit comments

Comments
 (0)