This commit is contained in:
Nicolas Patry 2024-10-08 12:04:09 +02:00
parent 8ab0d60cf8
commit 3e8d722733
No known key found for this signature in database
GPG Key ID: E939E8CC91A1C674
2 changed files with 12 additions and 10 deletions

View File

@ -56,7 +56,7 @@ jobs:
export dockerfile="Dockerfile_amd"
export label_extension="-rocm"
export docker_devices="/dev/kfd,/dev/dri"
export docker_volume="/mnt/cache/tgi"
export docker_volume="/mnt"
export runs_on="amd-gpu-runners"
export platform=""
export extra_pytest="-k test_flash_gemma_gptq_load"
@ -75,7 +75,7 @@ jobs:
export label_extension="-intel-cpu"
export docker_devices=""
export docker_volume="/mnt/cache"
export runs_on="ubuntu-latest"
export runs_on="aws-highmemory-32-plus-priv"
export platform="cpu"
export extra_pytest=""
;;

View File

@ -505,12 +505,14 @@ def launcher(event_loop):
if DOCKER_VOLUME:
volumes = [f"{DOCKER_VOLUME}:/data"]
if DOCKER_DEVICES:
devices = DOCKER_DEVICES.split(",")
if DOCKER_DEVICES is not None:
devices = DOCKER_DEVICES.strip().split(",")
visible = os.getenv("ROCR_VISIBLE_DEVICES")
if visible:
env["ROCR_VISIBLE_DEVICES"] = visible
device_requests = []
if not devices:
devices = None
else:
devices = []
device_requests = [
@ -532,16 +534,16 @@ 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,
auto_remove=False,
detach=True,
device_requests=device_requests,
devices=devices,
volumes=volumes,
ports={"80/tcp": port},
# healthcheck={"timeout": int(10 * 1e9)},
# shm_size="1G",
healthcheck={"timeout": int(10 * 1e9)},
shm_size="1G",
)
import time