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=${{ needs.build-and-push.outputs.docker_image }}
|
||||||
export DOCKER_IMAGE=busybox
|
export DOCKER_IMAGE=busybox
|
||||||
# export DOCKER_DEVICES=${{ needs.build-and-push.outputs.docker_devices }}
|
# 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 EXTRA_PYTEST="${{ needs.build-and-push.outputs.extra_pytest }}"
|
||||||
# export HF_TOKEN=${{ secrets.HF_TOKEN }}
|
# export HF_TOKEN=${{ secrets.HF_TOKEN }}
|
||||||
echo $DOCKER_IMAGE
|
echo $DOCKER_IMAGE
|
||||||
|
@ -507,9 +507,9 @@ def launcher(event_loop):
|
|||||||
|
|
||||||
if DOCKER_DEVICES:
|
if DOCKER_DEVICES:
|
||||||
devices = DOCKER_DEVICES.split(",")
|
devices = DOCKER_DEVICES.split(",")
|
||||||
visible = os.getenv("ROCR_VISIBLE_DEVICES")
|
# visible = os.getenv("ROCR_VISIBLE_DEVICES")
|
||||||
if visible:
|
# if visible:
|
||||||
env["ROCR_VISIBLE_DEVICES"] = visible
|
# env["ROCR_VISIBLE_DEVICES"] = visible
|
||||||
device_requests = []
|
device_requests = []
|
||||||
else:
|
else:
|
||||||
devices = []
|
devices = []
|
||||||
@ -524,11 +524,11 @@ def launcher(event_loop):
|
|||||||
container = client.containers.run(
|
container = client.containers.run(
|
||||||
DOCKER_IMAGE,
|
DOCKER_IMAGE,
|
||||||
command=args,
|
command=args,
|
||||||
name=container_name,
|
# name=container_name,
|
||||||
environment=env,
|
environment=env,
|
||||||
auto_remove=False,
|
auto_remove=False,
|
||||||
detach=True,
|
detach=True,
|
||||||
# device_requests=device_requests,
|
device_requests=device_requests,
|
||||||
devices=devices,
|
devices=devices,
|
||||||
volumes=volumes,
|
volumes=volumes,
|
||||||
ports={"80/tcp": port},
|
ports={"80/tcp": port},
|
||||||
|
Loading…
Reference in New Issue
Block a user