Asaad Almutareb commited on
Commit
8ba1a3e
Β·
1 Parent(s): f66560f

updated devcontainer config

Browse files
.devcontainer/Dockerfile CHANGED
@@ -1,15 +1,44 @@
1
- ARG VARIANT="3.10-bookworm"
2
- FROM mcr.microsoft.com/devcontainers/python:1-${VARIANT}
3
- #FROM langchain/langchain
4
 
5
- # [Optional] Uncomment if you want to install an additional version of node using nvm
6
- # ARG EXTRA_NODE_VERSION=10
7
- # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
8
 
9
- # [Optional] Uncomment if you want to install more global node modules
10
- # RUN su node -c "npm install -g <your-package-list-here>"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- #COPY library-scripts/github-debian.sh /tmp/library-scripts/
13
- RUN apt-get update && apt-get update
14
- RUN pip install --upgrade pip
15
- #RUN pip install -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "Python 3.10",
5
- // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
- //"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bookworm"
 
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": "pip3 install --user -r requirements.txt",
20
 
21
- // Configure tool-specific properties.
22
  "customizations": {
23
- // Configure properties specific to VS Code.
24
- "vscode": {
25
- //Add the IDs of extensions you want installed when the container is created.
26
- "extensions": ["ms-azuretools.vscode-docker", "ms-python.python", "qwtel.sqlite-viewer"]
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
+ }