mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
DEvice request, no container name
This commit is contained in:
parent
cf92174925
commit
27d64fe7e1
1
.github/workflows/build.yaml
vendored
1
.github/workflows/build.yaml
vendored
@ -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
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user