Skip to content

Commit

Permalink
update container
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdcs committed Feb 16, 2024
1 parent 40d76e3 commit f37c17e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"features": {
"ghcr.io/devcontainers/features/git:1": {},
},
"postCreateCommand": "zsh /workspaces/DevContainer/.devcontainer/scripts/postcreate.zsh",
"postStartCommand": "zsh /workspaces/DevContainer/.devcontainer/scripts/poststart.zsh",
"postCreateCommand": "zsh /workspaces/DevContainer/.devcontainer/scripts/post-create.zsh",
"postStartCommand": "zsh /workspaces/DevContainer/.devcontainer/scripts/post-start.zsh",
"customizations": {
"vscode": {
"extensions": [
"ms-python.black-formatter",
"ms-python.python",
"ms-python.isort",
"ms-toolsai.jupyter",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"streetsidesoftware.code-spell-checker",
"charliermarsh.ruff",
"njpwerner.autodocstring",
"tamasfe.even-better-toml",
"ms-python.black-formatter",
"ms-python.isort",
"ms-toolsai.jupyter",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"p403n1x87.austin-vscode"
]
}
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ FROM mcr.microsoft.com/devcontainers/python:3.12
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y git git-lfs austin --no-install-recommends
apt-get install -y --no-install-recommends \
git git-lfs austin graphviz graphviz-dev libboost-all-dev libilmbase-dev \
libopenexr-dev libpng-dev libtiff5-dev

RUN apt-get autoremove -y && \
apt-get clean -y && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ cd /workspaces/DevContainer

# https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
# https://github.com/microsoft/vscode-remote-release/issues/7923
git config --global --add safe.directory .
git config --global --add safe.directory /workspaces/DevContainer
git submodule update --init

poetry install
poetry install
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
8 changes: 8 additions & 0 deletions .devcontainer/scripts/post-start.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!zsh
git config --global --add safe.directory /workspaces/DevContainer
git config --global --add safe.directory /workspaces/DevContainer/**

poetry install

git fetch
git status -sb -uno
6 changes: 0 additions & 6 deletions .devcontainer/scripts/poststart.zsh

This file was deleted.

3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"whitepoint"
],
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.analysis.typeCheckingMode": "basic",
Expand Down Expand Up @@ -107,5 +106,5 @@
"isort.importStrategy": "fromEnvironment",
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
}
}

0 comments on commit f37c17e

Please sign in to comment.