From 1da2a7346a9d0eb0ad3425a0b83f3486f23ec8c7 Mon Sep 17 00:00:00 2001 From: Valerio Como Date: Tue, 17 Dec 2024 12:30:56 +0000 Subject: [PATCH] chore: devcontainer setup --- .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ .devcontainer/postCreateCommand.sh | 4 ++++ 2 files changed, 29 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..438ecfab --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// 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": "rag-tutorial-v2", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm", + "features": { + "ghcr.io/prulloac/devcontainer-features/ollama:1": {} + }, + + // 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": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "sh .devcontainer/postCreateCommand.sh" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100644 index 00000000..576aeedf --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,4 @@ +pip3 install --user -r requirements.txt +pip install -U langchain-community +ollama pull nomic-embed-text +ollama pull mistral \ No newline at end of file