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 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
|
||||||
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}
|
# pytest -s -vv integration-tests ${PYTEST_FLAGS} ${EXTRA_PYTEST}
|
||||||
|
@ -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 = []
|
||||||
@ -517,18 +517,24 @@ def launcher(event_loop):
|
|||||||
docker.types.DeviceRequest(count=gpu_count, capabilities=[["gpu"]])
|
docker.types.DeviceRequest(count=gpu_count, capabilities=[["gpu"]])
|
||||||
]
|
]
|
||||||
|
|
||||||
print("Starting docker")
|
raise Exception(
|
||||||
|
f"""
|
||||||
args = ["sleep", "infinity"]
|
Docoker image: {DOCKER_IMAGE}
|
||||||
|
args: {args}
|
||||||
|
container name: {container_name}
|
||||||
|
env: {env}
|
||||||
|
device_requests: {device_requests}
|
||||||
|
devices: {devices}
|
||||||
|
"""
|
||||||
|
)
|
||||||
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