DEvice request, no container name

This commit is contained in:
Nicolas Patry 2024-10-02 17:36:35 +02:00
parent cf92174925
commit 27d64fe7e1
No known key found for this signature in database
GPG Key ID: E939E8CC91A1C674
2 changed files with 6 additions and 5 deletions

View File

@ -193,6 +193,7 @@ jobs:
# export DOCKER_IMAGE=${{ needs.build-and-push.outputs.docker_image }}
export DOCKER_IMAGE=busybox
# export DOCKER_DEVICES=${{ needs.build-and-push.outputs.docker_devices }}
export DOCKER_DEVICES=/dev/kfd,/dev/cri
# export EXTRA_PYTEST="${{ needs.build-and-push.outputs.extra_pytest }}"
# export HF_TOKEN=${{ secrets.HF_TOKEN }}
echo $DOCKER_IMAGE

View File

@ -507,9 +507,9 @@ def launcher(event_loop):
if DOCKER_DEVICES:
devices = DOCKER_DEVICES.split(",")
visible = os.getenv("ROCR_VISIBLE_DEVICES")
if visible:
env["ROCR_VISIBLE_DEVICES"] = visible
# visible = os.getenv("ROCR_VISIBLE_DEVICES")
# if visible:
# env["ROCR_VISIBLE_DEVICES"] = visible
device_requests = []
else:
devices = []
@ -524,11 +524,11 @@ def launcher(event_loop):
container = client.containers.run(
DOCKER_IMAGE,
command=args,
name=container_name,
# name=container_name,
environment=env,
auto_remove=False,
detach=True,
# device_requests=device_requests,
device_requests=device_requests,
devices=devices,
volumes=volumes,
ports={"80/tcp": port},