Skip to content

Commit

Permalink
Fix mambaforge shell history (backport rapidsai#219) (rapidsai#225)
Browse files Browse the repository at this point in the history
* Fix mambaforge shell history (rapidsai#219)

* disable history when restoring shell options

* Update devcontainer-feature.json

* login to dockerhub so we don't hit rate limits
  • Loading branch information
trxcllnt authored Feb 8, 2024
1 parent bd29430 commit 635876f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-and-test-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
with:
persist-credentials: false

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}

- name: ${{ inputs.name }}
uses: ./.github/actions/build-and-test-feature
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-test-and-push-linux-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ jobs:
features: "${{ inputs.features }}"
container_env: "${{ inputs.container_env }}"

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}

- name: Build ${{ steps.json.outputs.tag }}-${{ matrix.arch }}
uses: ./.github/actions/build-linux-image
with:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/build-test-and-push-windows-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
tag=${version}-cuda${cuda}-cl${cl}-${{ inputs.os }}${{ matrix.edition }}
EOF
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}

- name: Build ${{ steps.info.outputs.tag }}
uses: ./.github/actions/build-windows-image
with:
Expand All @@ -79,13 +85,6 @@ jobs:
version: "${{ steps.info.outputs.version }}"
edition: "${{ matrix.edition }}"

- if: inputs.push == 'true'
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}

- if: inputs.push == 'true'
name: Push ${{ steps.info.outputs.tag }}
shell: powershell
Expand Down
6 changes: 3 additions & 3 deletions features/src/mambaforge/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ for default_conda_env_name in ${DEFAULT_CONDA_ENV:-} ${CONDA_DEFAULT_ENV:-} base
break;
fi
# Temporarily allow unbound variables for conda activation.
oldstate="$(shopt -po; shopt -p)"; [[ -o errexit ]] && oldstate="${oldstate}; set -e"; set +u;
oldstate="$(shopt -po | grep -E '(nounset|verbose|xtrace)')"; set +u;
if conda activate "${default_conda_env_name}" 2>/dev/null; then
{ set +vx; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
{ set +vxo history; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
break;
else
{ set +vx; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
{ set +vxo history; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
continue;
fi
done
Expand Down
2 changes: 1 addition & 1 deletion features/src/mambaforge/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Mambaforge",
"id": "mambaforge",
"version": "24.2.2",
"version": "24.2.3",
"description": "A feature to install mambaforge",
"options": {
"version": {
Expand Down

0 comments on commit 635876f

Please sign in to comment.