mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
Attemp #1
This commit is contained in:
parent
cbc7d09da6
commit
7bead9ef0f
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@ -197,5 +197,7 @@ jobs:
|
||||
# export EXTRA_PYTEST="${{ needs.build-and-push.outputs.extra_pytest }}"
|
||||
# export HF_TOKEN=${{ secrets.HF_TOKEN }}
|
||||
echo $DOCKER_IMAGE
|
||||
python -c 'import docker; client = docker.from_env(); client.containers.run("registry.internal.huggingface.tech/api-inference/community/text-generation-inference:sha-318bbc7-rocm", devices=["/dev/kfd", "/dev/dri"])'
|
||||
# python -c 'import docker; client = docker.from_env(); client.containers.run("registry.internal.huggingface.tech/api-inference/community/text-generation-inference:sha-318bbc7-rocm", devices=["/dev/kfd", "/dev/dri"], env={"MODEL_ID": "gpt2"}, detach=True)'
|
||||
which pytest
|
||||
pytest -s -vv integration-tests -k flash_llama_grammar_tools
|
||||
# pytest -s -vv integration-tests ${PYTEST_FLAGS} ${EXTRA_PYTEST}
|
||||
|
@ -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 = []
|
||||
@ -517,18 +517,24 @@ def launcher(event_loop):
|
||||
docker.types.DeviceRequest(count=gpu_count, capabilities=[["gpu"]])
|
||||
]
|
||||
|
||||
print("Starting docker")
|
||||
|
||||
args = ["sleep", "infinity"]
|
||||
|
||||
raise Exception(
|
||||
f"""
|
||||
Docoker image: {DOCKER_IMAGE}
|
||||
args: {args}
|
||||
container name: {container_name}
|
||||
env: {env}
|
||||
device_requests: {device_requests}
|
||||
devices: {devices}
|
||||
"""
|
||||
)
|
||||
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