Skip to content

docker

docker #19

Workflow file for this run

name: Dummy
on:
push:
branches:
- dummy_branch
env:
HF_HOME: /mnt/cache
# For gated repositories, we still need to agree to share information on the Hub repo. page in order to get access.
# This token is created under the bot `hf-transformers-bot`.
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
jobs:
# echo:
# name: show host
# runs-on: [single-gpu, nvidia-gpu, a10, ci]
# steps:
# - name: NVIDIA-SMI
# run: |
# echo "Hello A10"
# nvidia-smi
#
# - name: show directory
# run: |
# ls -l /mnt/cache/.cache/huggingface
#
# container:
# name: load docker image
# runs-on: [single-gpu, nvidia-gpu, a10, ci]
# container:
# # TODO: make this $ {{ inputs.image }}
# image: huggingface/transformers-all-latest-gpu
# options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
# steps:
# - name: NVIDIA-SMI
# run: |
# echo "Hello A10"
# nvidia-smi
#
# - name: show directory
# run: |
# ls -l /mnt/cache/
github_repo:
name: github repo
runs-on: [single-gpu, nvidia-gpu, a10, ci]
container:
# TODO: make this $ {{ inputs.image }}
image: huggingface/transformers-all-latest-gpu
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check repository
# Need `git config --global --add safe.directory ...` line otherwise error
# `fatal: detected dubious ownership in repository at '/__w/Google-Cloud-Containers/Google-Cloud-Containers'`
run: |
pwd
ls -la
git config --global --add safe.directory /__w/Google-Cloud-Containers/Google-Cloud-Containers
git status
git log -n 3
# Only for `image: huggingface/transformers-all-latest-gpu`
- name: Check transformers repository
run: |
ls -l /transformers
cd /transformers
git status
git log -n 3
- name: run tests
run: |
python3 -m pytest -v tests/models