Skip to content

Commit a6e7492

Browse files
.
1 parent 4a18c23 commit a6e7492

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.devcontainer/poetry.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[virtualenvs]
2+
create = false

.devcontainer/pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[tool.poetry]
2+
name = "base"
3+
version = "0.1.0"
4+
description = ""
5+
authors = ["Your Name <you@example.com>"]
6+
7+
[tool.poetry.dependencies]
8+
python = "^3.11"
9+
10+
[tool.poetry.dev-dependencies]
11+
12+
[build-system]
13+
requires = ["poetry-core>=1.0.0"]
14+
build-backend = "poetry.core.masonry.api"

.devcontainer/vm/Dockerfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,25 @@ RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/shar
88

99
RUN pip3 --disable-pip-version-check --no-cache-dir install -U \
1010
'poetry==1.1.13' \
11-
'pip==22.1.2' \
11+
'pip==22.1.2'
12+
13+
USER vscode
14+
COPY pyproject.toml /opt/base/pyproject.toml
15+
COPY poetry.toml /opt/base/poetry.toml
16+
RUN sudo chown -R vscode:vscode /opt
17+
18+
ENV PIP_TARGET=/opt/pip
19+
ENV PYTHONPATH=/opt/pip
20+
ENV PATH="${PIP_TARGET}/bin:${PATH}"
21+
WORKDIR /opt/base
22+
RUN poetry add --no-interaction \
1223
'ipykernel' \
1324
'jupyter' \
1425
'nbstripout' \
1526
'pre-commit' \
16-
'black'
17-
USER vscode
27+
'black' \
28+
&& rm -rf ~/.cache/pypoetry/{cache,artifacts}
29+
1830
# prevent homebrew from updating or upgrading to save time
1931
ENV HOMEBREW_NO_AUTO_UPDATE=1
2032
ENV HOMEBREW_NO_INSTALL_UPGRADE=1

0 commit comments

Comments
 (0)