winglian commited on
Commit
14ebd2e
β€’
1 Parent(s): 4a79dab

build base too

Browse files
.github/workflows/main.yml CHANGED
@@ -7,7 +7,34 @@ on:
7
  - "dev"
8
 
9
  jobs:
10
- build:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  if: github.repository_owner == 'OpenAccess-AI-Collective'
12
  runs-on: self-hosted
13
  steps:
@@ -29,7 +56,7 @@ jobs:
29
  uses: docker/build-push-action@v4
30
  with:
31
  context: .
32
- file: ./Dockerfile
33
  push: ${{ github.event_name != 'pull_request' }}
34
  tags: ${{ steps.metadata.outputs.tags }}
35
  labels: ${{ steps.metadata.outputs.labels }}
 
7
  - "dev"
8
 
9
  jobs:
10
+ build-base:
11
+ if: github.repository_owner == 'OpenAccess-AI-Collective'
12
+ runs-on: self-hosted
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v3
16
+ - name: Docker metadata
17
+ id: metadata
18
+ uses: docker/metadata-action@v3
19
+ with:
20
+ images: winglian/axolotl-base
21
+ - name: Login to Docker Hub
22
+ uses: docker/login-action@v2
23
+ with:
24
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
25
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
26
+ - name: Set up Docker Buildx
27
+ uses: docker/setup-buildx-action@v2
28
+ - name: Build
29
+ uses: docker/build-push-action@v4
30
+ with:
31
+ context: .
32
+ file: ./docker/Dockerfile-base
33
+ push: ${{ github.event_name != 'pull_request' }}
34
+ tags: ${{ steps.metadata.outputs.tags }}
35
+ labels: ${{ steps.metadata.outputs.labels }}
36
+ build-axolotl:
37
+ needs: build-base
38
  if: github.repository_owner == 'OpenAccess-AI-Collective'
39
  runs-on: self-hosted
40
  steps:
 
56
  uses: docker/build-push-action@v4
57
  with:
58
  context: .
59
+ file: ./docker/Dockerfile
60
  push: ${{ github.event_name != 'pull_request' }}
61
  tags: ${{ steps.metadata.outputs.tags }}
62
  labels: ${{ steps.metadata.outputs.labels }}
.gitlab-ci.yml DELETED
@@ -1,14 +0,0 @@
1
- image: "python:3.7"
2
-
3
- build:
4
- stage: build
5
- image:
6
- name: gcr.io/kaniko-project/executor:v1.9.0-debug
7
- entrypoint: [""]
8
- script:
9
- - /kaniko/executor
10
- --context "${CI_PROJECT_DIR}"
11
- --dockerfile "${CI_PROJECT_DIR}/Dockerfile"
12
- --no-push
13
- rules:
14
- - if: $CI_COMMIT_SHA
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Dockerfile β†’ docker/Dockerfile RENAMED
File without changes
docker/Dockerfile-base ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG CUDA_VERSION="11.8.0"
2
+ ARG CUDNN_VERSION="8"
3
+ ARG UBUNTU_VERSION="22.04"
4
+
5
+ FROM nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION
6
+
7
+ ENV PATH="/root/miniconda3/bin:${PATH}"
8
+
9
+ ARG PYTHON_VERSION="3.9"
10
+ ENV PYTHON_VERSION=$PYTHON_VERSION
11
+
12
+ RUN apt-get update
13
+ RUN apt-get install -y wget && rm -rf /var/lib/apt/lists/*
14
+
15
+ RUN wget \
16
+ https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
17
+ && mkdir /root/.conda \
18
+ && bash Miniconda3-latest-Linux-x86_64.sh -b \
19
+ && rm -f Miniconda3-latest-Linux-x86_64.sh
20
+
21
+ RUN conda create -n "py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
22
+
23
+ ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}"
24
+
25
+ WORKDIR /workspace