winglian commited on
Commit
6011343
1 Parent(s): 419b2a6

cloud image w/o tmux (#1628)

Browse files
.github/workflows/main.yml CHANGED
@@ -125,3 +125,45 @@ jobs:
125
  ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
126
  ${{ (matrix.is_latest) && format('{0}-latest', steps.metadata.outputs.tags) || '' }}
127
  labels: ${{ steps.metadata.outputs.labels }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
126
  ${{ (matrix.is_latest) && format('{0}-latest', steps.metadata.outputs.tags) || '' }}
127
  labels: ${{ steps.metadata.outputs.labels }}
128
+
129
+ build-axolotl-cloud-no-tmux:
130
+ needs: build-axolotl
131
+ if: ${{ ! contains(github.event.commits[0].message, '[skip docker]]') && github.repository_owner == 'OpenAccess-AI-Collective' }}
132
+ # this job needs to be run on self-hosted GPU runners...
133
+ strategy:
134
+ matrix:
135
+ include:
136
+ - cuda: 121
137
+ cuda_version: 12.1.0
138
+ python_version: "3.11"
139
+ pytorch: 2.3.0
140
+ axolotl_extras:
141
+ runs-on: axolotl-gpu-runner
142
+ steps:
143
+ - name: Checkout
144
+ uses: actions/checkout@v4
145
+ - name: Docker metadata
146
+ id: metadata
147
+ uses: docker/metadata-action@v5
148
+ with:
149
+ images: winglian/axolotl-cloud-term
150
+ - name: Login to Docker Hub
151
+ uses: docker/login-action@v3
152
+ with:
153
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
154
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
155
+ - name: Set up Docker Buildx
156
+ uses: docker/setup-buildx-action@v2
157
+ - name: Build
158
+ uses: docker/build-push-action@v5
159
+ with:
160
+ context: .
161
+ build-args: |
162
+ BASE_TAG=${{ github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
163
+ CUDA=${{ matrix.cuda }}
164
+ file: ./docker/Dockerfile-cloud-no-tmux
165
+ push: ${{ github.event_name != 'pull_request' }}
166
+ tags: |
167
+ ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
168
+ ${{ (matrix.is_latest) && format('{0}-latest', steps.metadata.outputs.tags) || '' }}
169
+ labels: ${{ steps.metadata.outputs.labels }}
docker/Dockerfile-cloud-no-tmux ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG BASE_TAG=main
2
+ FROM winglian/axolotl:$BASE_TAG
3
+
4
+ ENV HF_DATASETS_CACHE="/workspace/data/huggingface-cache/datasets"
5
+ ENV HUGGINGFACE_HUB_CACHE="/workspace/data/huggingface-cache/hub"
6
+ ENV TRANSFORMERS_CACHE="/workspace/data/huggingface-cache/hub"
7
+ ENV HF_HOME="/workspace/data/huggingface-cache/hub"
8
+ ENV HF_HUB_ENABLE_HF_TRANSFER="1"
9
+
10
+ EXPOSE 8888
11
+ EXPOSE 22
12
+
13
+ COPY scripts/cloud-entrypoint.sh /root/cloud-entrypoint.sh
14
+ COPY scripts/motd /etc/motd
15
+
16
+ RUN pip install jupyterlab notebook ipywidgets && \
17
+ jupyter lab clean
18
+ RUN apt install --yes --no-install-recommends openssh-server tmux && \
19
+ mkdir -p ~/.ssh && \
20
+ chmod 700 ~/.ssh && \
21
+ printf "[ ! -z \"\$TERM\" -a -r /etc/motd ] && cat /etc/motd\n" >> ~/.bashrc && \
22
+ chmod +x /workspace/axolotl/scripts/cloud-entrypoint.sh && \
23
+ chmod +x /root/cloud-entrypoint.sh
24
+
25
+ ENTRYPOINT ["/root/cloud-entrypoint.sh"]
26
+ CMD ["sleep", "infinity"]