Skip to content

Commit

Permalink
Update devcontainer (pymc-devs#7017)
Browse files Browse the repository at this point in the history
* Update dev container on release and schedule

* Use latest version of upstream dev container image

* Remove pre-commit cache hack

* Add Jupyter extension to container
  • Loading branch information
maresb authored Nov 17, 2023
1 parent 305eb39 commit 1d7c957
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/devcontainer-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: devcontainer-docker-image

on:
workflow_dispatch:
schedule:
- cron: "48 19 * * 5" # Fridays at 19:48 UTC
release:
types: [published]

env:
REGISTRY: ghcr.io
Expand Down
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ vscode:
- eamodio.gitlens
- ms-python.python
- ms-pyright.pyright
- ms-toolsai.jupyter
- donjayamanne.githistory

github:
Expand Down
14 changes: 2 additions & 12 deletions scripts/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/mamba-org/micromamba-devcontainer:git-e04d158
FROM ghcr.io/mamba-org/micromamba-devcontainer:latest

COPY --chown=${MAMBA_USER}:${MAMBA_USER} conda-envs/environment-dev.yml /tmp/environment-dev.yml
RUN : \
Expand All @@ -8,15 +8,5 @@ RUN : \
&& sudo chmod -R a+rwx /opt/conda \
;

# Run subsequent commands in an activated Conda environment
ARG MAMBA_DOCKERFILE_ACTIVATE=1

ENV PRE_COMMIT_HOME=/opt/.pre-commit-cache-prebuilt
COPY --chown=${MAMBA_USER}:${MAMBA_USER} .pre-commit-config.yaml /fake-repo/.pre-commit-config.yaml
RUN : \
&& sudo mkdir --mode=777 /opt/.pre-commit-cache-prebuilt \
&& cd /fake-repo \
&& git init \
&& pre-commit install-hooks \
&& sudo rm -rf /fake-repo \
&& sudo chmod -R a+rwx /opt/.pre-commit-cache-prebuilt \
;

0 comments on commit 1d7c957

Please sign in to comment.