Spaces:
Sleeping
Sleeping
Asaad Almutareb
commited on
Commit
Β·
8ba1a3e
1
Parent(s):
f66560f
updated devcontainer config
Browse files- .devcontainer/Dockerfile +41 -12
- .devcontainer/devcontainer.json +15 -22
.devcontainer/Dockerfile
CHANGED
@@ -1,15 +1,44 @@
|
|
1 |
-
|
2 |
-
FROM mcr.microsoft.com/devcontainers/
|
3 |
-
#FROM langchain/langchain
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
#
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM mcr.microsoft.com/devcontainers/base:jammy
|
2 |
+
# FROM mcr.microsoft.com/devcontainers/base:jammy
|
|
|
3 |
|
4 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
5 |
+
ARG USER=vscode
|
|
|
6 |
|
7 |
+
RUN DEBIAN_FRONTEND=noninteractive \
|
8 |
+
&& apt-get update \
|
9 |
+
&& apt-get install -y build-essential --no-install-recommends make \
|
10 |
+
ca-certificates \
|
11 |
+
git \
|
12 |
+
libssl-dev \
|
13 |
+
zlib1g-dev \
|
14 |
+
libbz2-dev \
|
15 |
+
libreadline-dev \
|
16 |
+
libsqlite3-dev \
|
17 |
+
wget \
|
18 |
+
curl \
|
19 |
+
llvm \
|
20 |
+
libncurses5-dev \
|
21 |
+
xz-utils \
|
22 |
+
tk-dev \
|
23 |
+
libxml2-dev \
|
24 |
+
libxmlsec1-dev \
|
25 |
+
libffi-dev \
|
26 |
+
liblzma-dev
|
27 |
|
28 |
+
# Python and poetry installation
|
29 |
+
USER $USER
|
30 |
+
ARG HOME="/home/$USER"
|
31 |
+
ARG PYTHON_VERSION=3.11
|
32 |
+
|
33 |
+
ENV PYENV_ROOT="${HOME}/.pyenv"
|
34 |
+
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${HOME}/.local/bin:$PATH"
|
35 |
+
|
36 |
+
RUN echo "done 0" \
|
37 |
+
&& curl https://pyenv.run | bash \
|
38 |
+
&& echo "done 1" \
|
39 |
+
&& pyenv install ${PYTHON_VERSION} \
|
40 |
+
&& echo "done 2" \
|
41 |
+
&& pyenv global ${PYTHON_VERSION} \
|
42 |
+
&& echo "done 3" \
|
43 |
+
&& curl -sSL https://install.python-poetry.org | python3 - \
|
44 |
+
&& poetry config virtualenvs.in-project true
|
.devcontainer/devcontainer.json
CHANGED
@@ -1,32 +1,25 @@
|
|
1 |
-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
2 |
-
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
3 |
{
|
4 |
-
"name": "
|
5 |
-
|
6 |
-
|
|
|
7 |
|
8 |
-
|
9 |
-
// build config for the docker image instead:
|
10 |
-
"build": { "dockerfile": "Dockerfile" },
|
11 |
-
|
12 |
-
// Features to add to the dev container. More info: https://containers.dev/features.
|
13 |
// "features": {},
|
14 |
|
15 |
-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
16 |
// "forwardPorts": [],
|
17 |
|
18 |
-
// Use 'postCreateCommand' to run commands after the container is created.
|
19 |
-
// "postCreateCommand": "
|
20 |
|
21 |
-
// Configure tool-specific properties.
|
22 |
"customizations": {
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
}
|
28 |
-
}//,
|
29 |
|
30 |
-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
31 |
// "remoteUser": "root"
|
32 |
-
}
|
|
|
|
|
|
|
1 |
{
|
2 |
+
"name": "poetry3-poetry-pyenv",
|
3 |
+
"build": {
|
4 |
+
"dockerfile": "Dockerfile"
|
5 |
+
},
|
6 |
|
7 |
+
// π Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
|
|
|
|
|
|
|
|
|
8 |
// "features": {},
|
9 |
|
10 |
+
// π Use 'forwardPorts' to make a list of ports inside the container available locally.
|
11 |
// "forwardPorts": [],
|
12 |
|
13 |
+
// π Use 'postCreateCommand' to run commands after the container is created.
|
14 |
+
// "postCreateCommand": "",
|
15 |
|
16 |
+
// π Configure tool-specific properties.
|
17 |
"customizations": {
|
18 |
+
"vscode": {
|
19 |
+
"extensions":["ms-python.python", "njpwerner.autodocstring","ms-azuretools.vscode-docker", "qwtel.sqlite-viewer"]
|
20 |
+
}
|
21 |
+
}
|
|
|
|
|
22 |
|
23 |
+
// π Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
24 |
// "remoteUser": "root"
|
25 |
+
}
|