-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the dev containers configuration (#21)
Adding the dev container configuration and updating the PDM config file to include all dependencies resolves #19
- Loading branch information
Showing
17 changed files
with
321 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG USER=vscode | ||
RUN apt update \ | ||
&& apt install -y --no-install-recommends curl wget git sudo build-essential libssl-dev zlib1g-dev libjpeg-dev libpng-dev libbz2-dev libreadline-dev libsqlite3-dev libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \ | ||
&& apt autoremove -y \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& usermod -s /usr/bin/zsh ${USER} | ||
|
||
USER ${USER} | ||
ARG HOME="/home/${USER}" | ||
WORKDIR ${HOME} | ||
|
||
ARG PYTHON_VERSION=3.12 | ||
ENV PYENV_ROOT=${HOME}/.pyenv | ||
ARG PYENV_PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims" | ||
ARG PDM_PATH="${HOME}/.local/bin" | ||
ENV PATH="${PYENV_PATH}:${PDM_PATH}:$PATH" | ||
RUN set -x \ | ||
&& curl http://pyenv.run | bash \ | ||
&& echo 'eval "$(pyenv init -)"' >>${HOME}/.zshrc \ | ||
&& pyenv install -v ${PYTHON_VERSION} \ | ||
&& pyenv global ${PYTHON_VERSION} | ||
|
||
ARG ZSH_CUSTOM=${HOME}/.oh-my-zsh/custom | ||
RUN curl -sSL https://pdm.fming.dev/install-pdm.py | python - \ | ||
&& mkdir ${ZSH_CUSTOM}/plugins/pdm \ | ||
&& pdm completion zsh > ${ZSH_CUSTOM}/plugins/pdm/_pdm \ | ||
&& sed -i "s|^plugins=(|&pdm |" ${HOME}/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python 3", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
//"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Add customizations for the editor | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"bierner.markdown-mermaid", | ||
"bpruitt-goddard.mermaid-markdown-syntax-highlighting", | ||
"DavidAnson.vscode-markdownlint", | ||
"donjayamanne.githistory", | ||
"eamodio.gitlens", | ||
"formulahendry.auto-close-tag", | ||
"GitHub.copilot-chat", | ||
"GitHub.copilot", | ||
"mhutchie.git-graph", | ||
"ms-python.debugpy", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"redhat.vscode-yaml", | ||
"tamasfe.even-better-toml" | ||
], | ||
"settings": { | ||
"debugpy.debugJustMyCode": true, | ||
"python.analysis.autoFormatStrings": true, | ||
"python.analysis.inlayHints.functionReturnTypes": true, | ||
"python.analysis.inlayHints.pytestParameters": true, | ||
"python.analysis.inlayHints.variableTypes": true, | ||
"python.formatting.provider": "black", | ||
"python.linting.enabled": true, | ||
"python.linting.mypyEnabled": true, | ||
"python.testing.pytestArgs": [ | ||
"." | ||
], | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.unittestEnabled": false | ||
} | ||
} | ||
}, | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "bash .devcontainer/post-create.sh" | ||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#! /usr/bin/env bash | ||
pdm sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
D:/dev/languages/miniforge3/python.exe | ||
/workspaces/basic-swerve-sim/.venv/bin/python |
Oops, something went wrong.