Skip to content

Commit de600c4

Browse files
Merge pull request #46 from huggingface/cuda12
Upgrade to Cuda12 and latest versions
2 parents 285b435 + 0096a3e commit de600c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1235
-579
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.github
2+
.pytest_cache
3+
.ruff_cache
4+
.tox
5+
.venv
6+
.gitignore
7+
makefile
8+
__pycache__
9+
tests
10+
.vscode

.github/workflows/build-container.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
uses: ./.github/workflows/docker-build-action.yaml
2020
with:
2121
image: inference-pytorch-cpu
22-
dockerfile: dockerfiles/pytorch/cpu/Dockerfile
22+
dockerfile: dockerfiles/pytorch/Dockerfile
23+
build_args: "BASE_IMAGE=ubuntu:22.04"
2324
secrets:
2425
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY }}
2526
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
@@ -28,7 +29,7 @@ jobs:
2829
uses: ./.github/workflows/docker-build-action.yaml
2930
with:
3031
image: inference-pytorch-gpu
31-
dockerfile: dockerfiles/pytorch/gpu/Dockerfile
32+
dockerfile: dockerfiles/pytorch/Dockerfile
3233
secrets:
3334
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY }}
3435
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}

.github/workflows/gpu-integ-test.yaml

Lines changed: 0 additions & 116 deletions
This file was deleted.

.github/workflows/integ-test.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
region:
5+
type: string
6+
required: false
7+
default: "us-east-1"
8+
hf_home:
9+
required: false
10+
type: string
11+
default: "/mnt/hf_cache/"
12+
hf_hub_cache:
13+
required: false
14+
type: string
15+
default: "/mnt/hf_cache/hub"
16+
run_slow:
17+
required: false
18+
type: string
19+
default: "True"
20+
test_path:
21+
type: string
22+
required: true
23+
test_parallelism:
24+
type: string
25+
required: false
26+
default: "4"
27+
build_img_cmd:
28+
type: string
29+
required: false
30+
default: "make inference-pytorch-gpu"
31+
log_level:
32+
type: string
33+
required: false
34+
default: "ERROR"
35+
log_format:
36+
type: string
37+
required: false
38+
default: "%(asctime)s %(levelname)s %(module)s:%(lineno)d %(message)s"
39+
runs_on:
40+
type: string
41+
required: false
42+
default: '["single-gpu", "nvidia-gpu", "t4", "ci"]'
43+
44+
jobs:
45+
pytorch-integration-tests:
46+
runs-on: ${{ fromJson(inputs.runs_on) }}
47+
env:
48+
AWS_REGION: ${{ inputs.region }}
49+
HF_HOME: ${{ inputs.hf_home }}
50+
HF_HUB_CACHE: ${{ inputs.hf_hub_cache }}
51+
RUN_SLOW: ${{ inputs.run_slow }}
52+
steps:
53+
- uses: actions/[email protected]
54+
- name: Docker Setup Buildx
55+
uses: docker/[email protected]
56+
- name: Docker Build
57+
run: ${{ inputs.build_img_cmd }}
58+
- name: Set up Python 3.11
59+
uses: actions/setup-python@v2
60+
with:
61+
python-version: 3.11
62+
- name: Install dependencies
63+
run: pip install ".[torch, test]"
64+
- name: Run local integration tests
65+
run: |
66+
python -m pytest \
67+
${{ inputs.test_path }} -n ${{ inputs.test_parallelism }} \
68+
--log-cli-level='${{ inputs.log_level }}' \
69+
--log-format='${{ inputs.log_format }}'
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Run Integration Tests
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
- '.github/workflows/unit-test.yaml'
8+
- '.github/workflows/quality.yaml'
9+
branches:
10+
- main
11+
pull_request:
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
pytorch-integration-local-gpu:
20+
name: Local Integration Tests - GPU
21+
uses: ./.github/workflows/integration-test-action.yaml
22+
with:
23+
test_path: "tests/integ/test_pytorch_local_gpu.py"
24+
build_img_cmd: "make inference-pytorch-gpu"
25+
pytorch-integration-remote-gpu:
26+
name: Remote Integration Tests - GPU
27+
uses: ./.github/workflows/integration-test-action.yaml
28+
with:
29+
test_path: "tests/integ/test_pytorch_remote_gpu.py"
30+
build_img_cmd: "make inference-pytorch-gpu"
31+
pytorch-integration-remote-cpu:
32+
name: Remote Integration Tests - CPU
33+
uses: ./.github/workflows/integration-test-action.yaml
34+
with:
35+
test_path: "tests/integ/test_pytorch_remote_cpu.py"
36+
build_img_cmd: "make inference-pytorch-cpu"
37+
runs_on: "['ci']"
38+
pytorch-integration-local-cpu:
39+
name: Local Integration Tests - CPU
40+
uses: ./.github/workflows/integration-test-action.yaml
41+
with:
42+
test_path: "tests/integ/test_pytorch_local_cpu.py"
43+
build_img_cmd: "make inference-pytorch-cpu"
44+
runs_on: "['ci']"

.github/workflows/quality.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Quality Check
22

33
on:
44
push:
5+
paths-ignore:
6+
- 'README.md'
57
branches:
68
- main
79
pull_request:
@@ -16,10 +18,10 @@ jobs:
1618
runs-on: ubuntu-latest
1719
steps:
1820
- uses: actions/checkout@v2
19-
- name: Set up Python 3.9
21+
- name: Set up Python 3.11
2022
uses: actions/setup-python@v2
2123
with:
22-
python-version: 3.9
24+
python-version: 3.11
2325
- name: Install Python dependencies
2426
run: pip install -e .[quality]
2527
- name: Run Quality check

0 commit comments

Comments
 (0)