From 36a8c5a0c38ec49e21a72973c840268d56d5566b Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Sun, 7 Apr 2024 20:20:36 +0300 Subject: [PATCH] misc settings, ymls and cmds --- _containers/devika/setup.gist | 13 ++++++- {lmstudio => _containers/lmstudio}/dockerfile | 4 +- _containers/opendevin/dockerfile | 39 +++++++++++++++++++ _containers/opendevin/start-services.sh | 12 ++++++ agent-py-bot/cmd.sh | 3 ++ config.json | 15 +++++++ memory1/intint.neo.py | 3 -- 7 files changed, 82 insertions(+), 7 deletions(-) rename {lmstudio => _containers/lmstudio}/dockerfile (98%) create mode 100644 _containers/opendevin/dockerfile create mode 100644 _containers/opendevin/start-services.sh create mode 100644 config.json diff --git a/_containers/devika/setup.gist b/_containers/devika/setup.gist index 4655c9b..7eba67a 100644 --- a/_containers/devika/setup.gist +++ b/_containers/devika/setup.gist @@ -13,10 +13,19 @@ conda activate devika rename sample.config.toml fill out config.toml - /ui#> bun run preview --host --port 3000 SET VITE_API_BASE_URL=https://api.dev.d-popov.com bun run dev --host - /#>python3 devika.py --debug \ No newline at end of file +# RUN: + /#>conda activate devika && python3 devika.py --debug + /#>conda activate node && npx bun run dev --host + + + + TOML: + + google search: + https://developers.google.com/custom-search/v1/introduction + https://programmablesearchengine.google.com/controlpanel/overview?cx=0382a4a0cfd6745b7 \ No newline at end of file diff --git a/lmstudio/dockerfile b/_containers/lmstudio/dockerfile similarity index 98% rename from lmstudio/dockerfile rename to _containers/lmstudio/dockerfile index 2883a67..ba472d6 100644 --- a/lmstudio/dockerfile +++ b/_containers/lmstudio/dockerfile @@ -1,5 +1,5 @@ -#FROM ollama/ollama -FROM ubuntu:20.04 +FROM ollama/ollama +# FROM ubuntu:20.04 # Avoid prompts from apt during build ARG DEBIAN_FRONTEND=noninteractive diff --git a/_containers/opendevin/dockerfile b/_containers/opendevin/dockerfile new file mode 100644 index 0000000..84157fa --- /dev/null +++ b/_containers/opendevin/dockerfile @@ -0,0 +1,39 @@ +# docker build -t opendevin . && docker run -d --name OpenDevin-1 -p 3050:3000 -p 3051:3001 opendevin + +# docker run --name OpenDevin-dev -it opendevin + +# Start with a base image that has both Python and Node.js +FROM nikolaik/python-nodejs:python3.11-nodejs14 + +# Install system dependencies required for the project +RUN apt-get update && apt-get install -y \ + git \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Clone the latest version of OpenDevin +WORKDIR /opendevin +RUN git clone https://github.com/OpenDevin/OpenDevin.git . + +# Install Python dependencies +WORKDIR /opendevin/backend +RUN python -m pipenv requirements > requirements.txt && python -m pip install -r requirements.txt +RUN python -m pip install -r requirements.txt + +# Install Node.js dependencies +WORKDIR /opendevin/frontend +RUN npm install monaco-editor +RUN npm install + +# Build the frontend +RUN npm run build + +# Expose backend and frontend ports +EXPOSE 3000 3001 + +# Add a script to start both backend and frontend services +WORKDIR /opendevin +COPY start-services.sh /opendevin/start-services.sh +RUN chmod +x /opendevin/start-services.sh + +CMD ["/opendevin/start-services.sh"] diff --git a/_containers/opendevin/start-services.sh b/_containers/opendevin/start-services.sh new file mode 100644 index 0000000..81a298a --- /dev/null +++ b/_containers/opendevin/start-services.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Navigate to the backend directory and start the backend server in the background +cd /opendevin/backend +uvicorn opendevin.server.listen:app --port 3000 & + +# Serve the frontend from the build directory +cd /opendevin/frontend/build +npx serve -l 3001 & + +# Keep the container running +wait diff --git a/agent-py-bot/cmd.sh b/agent-py-bot/cmd.sh index f7f52aa..d19e8f2 100644 --- a/agent-py-bot/cmd.sh +++ b/agent-py-bot/cmd.sh @@ -30,4 +30,7 @@ in python, create an app that will search for a news about a specific topic on t +# devika +create new homepage for memecoin. look at https://donk.meme/ for inspiration about functionality. but the design should be novel. + diff --git a/config.json b/config.json new file mode 100644 index 0000000..9990c5b --- /dev/null +++ b/config.json @@ -0,0 +1,15 @@ +{ + "tabAutocompleteModel": { + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "stable-code:code", + "apiBase": "https://ollama.d-popov.com" + } +} + + +// original: "tabAutocompleteModel": { +// "title": "Starcoder 3b", +// "provider": "ollama", +// "model": "starcoder-3b" +// }, \ No newline at end of file diff --git a/memory1/intint.neo.py b/memory1/intint.neo.py index f545895..eb5f358 100644 --- a/memory1/intint.neo.py +++ b/memory1/intint.neo.py @@ -30,9 +30,6 @@ class Neo4jConnection: @staticmethod def _create_constraints_and_indexes(tx): - # Constraints and indexes for Person - tx.run("CREATE CONSTRAINT ON (p:Person) ASSERT p.person_id IS UNIQUE;") - # Constraints and indexes for Memory tx.run("CREATE CONSTRAINT ON (m:Memory) ASSERT m.memory_id IS UNIQUE;") tx.run("CREATE INDEX ON :Memory(content);")