diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e454fd105..31da5109e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,22 +69,22 @@ jobs: strategy: matrix: include: - - cuda: cu118 + - cuda: 118 cuda_version: 11.8.0 python_version: "3.9" pytorch: 2.0.1 axolotl_extras: - - cuda: cu118 + - cuda: 118 cuda_version: 11.8.0 python_version: "3.10" pytorch: 2.0.1 axolotl_extras: - - cuda: cu118 + - cuda: 118 cuda_version: 11.8.0 python_version: "3.9" pytorch: 2.0.1 axolotl_extras: gptq - - cuda: cu117 + - cuda: 117 cuda_version: 11.7.1 python_version: "3.9" pytorch: 1.13.1 @@ -110,8 +110,9 @@ jobs: with: context: . build-args: | - BASE_TAG=${{ github.ref_name }}-py${{ matrix.python_version }}-${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} + BASE_TAG=${{ github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} + CUDA=${{ matrix.cuda }} file: ./docker/Dockerfile-runpod push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} + tags: ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} labels: ${{ steps.metadata.outputs.labels }} diff --git a/docker/Dockerfile b/docker/Dockerfile index 943feb6e3..6a275472d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,6 +3,8 @@ FROM winglian/axolotl-base:$BASE_TAG ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6+PTX" ARG AXOLOTL_EXTRAS="" +ARG CUDA="118" +ENV BNB_CUDA_VERSION=$CUDA RUN apt-get update && \ apt-get install -y vim curl diff --git a/scripts/runpod-entrypoint.sh b/scripts/runpod-entrypoint.sh old mode 100644 new mode 100755 index f712e4ab7..b7cef80b4 --- a/scripts/runpod-entrypoint.sh +++ b/scripts/runpod-entrypoint.sh @@ -1,10 +1,21 @@ #!/bin/bash -echo $PUBLIC_KEY >> ~/.ssh/authorized_keys -chmod 700 -R ~/.ssh +# Export specific ENV variables to /etc/rp_environment +echo "Exporting environment variables..." +printenv | grep -E '^RUNPOD_|^PATH=|^_=' | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/' >> /etc/rp_environment +echo 'source /etc/rp_environment' >> ~/.bashrc -# Start the SSH service in the background -service ssh start +if [[ $PUBLIC_KEY ]] +then + mkdir -p ~/.ssh + chmod 700 ~/.ssh + echo $PUBLIC_KEY >> ~/.ssh/authorized_keys + chmod 700 -R ~/.ssh + # Start the SSH service in the background + service ssh start +else + echo "No PUBLIC_KEY ENV variable provided, not starting openSSH daemon" +fi # Execute the passed arguments (CMD) exec "$@"