-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (46 loc) · 1.47 KB
/
build_push_image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "CD: build & push image"
on:
push:
branches:
- 'init'
# on:
# workflow_dispatch:
env:
PYTHON_DEFAULT_VERSION: "3.12"
TAG_VERSION: "v0-latest"
DOCKER_REPO_NAME: "backenddevelopersltd/compute-horde-prompt-gen"
jobs:
deploy:
timeout-minutes: 15
# runs-on: ubuntu-latest
# runs-on: ubuntu-latest-4-cores
runs-on:
group: bulkier
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Login Dockerhub
run: echo "${{ secrets.DOCKERHUB_KEY }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
# - name: Install dependencies
# run: |
# # python -m pip install --upgrade 'pdm>=2.12,<3'
# # pdm install transformers
# python -m pip install transformers torch
#
# - name: Docker build and push
# run: |
# df -h
# IMAGE_NAME="${DOCKER_REPO_NAME}:${TAG_VERSION}"
#
# cd src/compute_horde_prompt_gen
# python download_model.py --huggingface_token "${{ secrets.HUGGINGFACE_API_KEY }}"
#
# ls
# docker build -t $IMAGE_NAME .
#
# # docker run -v ./output/:/app/output/ $IMAGE_NAME --number_of_batches 5 --number_of_prompts_per_batch 30 --uuids uuid1,uuid2,uuid3,uuid4,uuid5