Skip to content

Commit

Permalink
feat: dev container for development
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrutchf committed Sep 18, 2024
1 parent d060540 commit 6ffaa7a
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM nvidia/cuda:12.6.1-base-ubuntu24.04

SHELL ["/bin/bash", "-c"]

RUN apt-get update && apt-get upgrade -y

RUN apt-get install -y build-essential \
git \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
llvm \
libncurses5-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
libffi-dev \
liblzma-dev \
python3-openssl \
libopencv-dev \
clang \
libclang-dev

USER 1000:1000
ENV HOME="/home/ubuntu"
RUN mkdir -p ${HOME}
WORKDIR ${HOME}

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv
ENV PYENV_ROOT="${HOME}/.pyenv"
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"

RUN pyenv install 3.12
RUN pyenv global 3.12
RUN pip install --upgrade pip
RUN pip install poetry
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"build": { "dockerfile": "Dockerfile" },
"runArgs": [
"--device",
"nvidia.com/gpu=all"
],
"postCreateCommand": "poetry install --with dev",
"customizations": {
"vscode": {
"extensions": [
"ms-python.vscode-pylance",
"ms-python.python",
"ms-toolsai.jupyter",
"njpwerner.autodocstring",
"ms-python.isort",
"eamodio.gitlens",
"VisualStudioExptTeam.vscodeintellicode",
"ms-python.black-formatter",
"ms-azuretools.vscode-docker"
]
}
}
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"VisualStudioExptTeam.vscodeintellicode",
"ms-python.black-formatter",
"github.vscode-github-actions",
"ms-vscode-remote.remote-containers"
"ms-vscode-remote.remote-containers",
"ms-azuretools.vscode-docker"
]
}

0 comments on commit 6ffaa7a

Please sign in to comment.