misc settings, ymls and cmds
This commit is contained in:
@@ -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
|
||||
# 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
|
||||
87
_containers/lmstudio/dockerfile
Normal file
87
_containers/lmstudio/dockerfile
Normal file
@@ -0,0 +1,87 @@
|
||||
FROM ollama/ollama
|
||||
# FROM ubuntu:20.04
|
||||
|
||||
# Avoid prompts from apt during build
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget \
|
||||
x11vnc \
|
||||
xvfb \
|
||||
net-tools \
|
||||
git \
|
||||
python3 \
|
||||
python3-numpy \
|
||||
novnc
|
||||
|
||||
# Create the /app directory to hold the application
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
# https://medium.com/@renswunnink/why-i-love-appimage-for-linux-distros-924769510ec5
|
||||
RUN wget -O lmstudio.AppImage "https://releases.lmstudio.ai/linux/0.2.18/beta/LM_Studio-0.2.18.AppImage" && \
|
||||
chmod u+x lmstudio.AppImage && \
|
||||
./lmstudio.AppImage --appimage-extract && \
|
||||
rm lmstudio.AppImage && \
|
||||
mv squashfs-root lmstudio
|
||||
|
||||
# or adddependencies on another layer
|
||||
RUN apt-get update && apt-get install -y \
|
||||
dbus pciutils \
|
||||
libglib2.0-0 \
|
||||
libnss3 \
|
||||
libgbm1 \
|
||||
libxshmfence1 \
|
||||
libgl1-mesa-glx \
|
||||
libegl1-mesa \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libgtk-3-0 \
|
||||
libasound2 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Setup a virtual display environment with XVFB
|
||||
RUN Xvfb :99 -screen 0 1024x768x16 &
|
||||
ENV DISPLAY=:99
|
||||
EXPOSE 8080
|
||||
# Expose port 5980 for noVNC
|
||||
EXPOSE 5980
|
||||
|
||||
RUN ln -s /app/lmstudio/lm-studio /lm-studio
|
||||
|
||||
#? RUN chmod +x /app/lmstudio/AppRun
|
||||
# Create a startup script to run Xvfb and your application
|
||||
# Create a startup script
|
||||
RUN echo '#!/bin/bash\n\
|
||||
Xvfb :99 -screen 0 1024x768x16 &\n\
|
||||
export DISPLAY=:99\n\
|
||||
# Start X11VNC\n\
|
||||
x11vnc -display :99 -nopw -listen localhost -xkb -forever &\n\
|
||||
# Start noVNC\n\
|
||||
/opt/noVNC/utils/launch.sh --vnc localhost:5900 --listen 5980\n\
|
||||
# Start the application\n\
|
||||
exec /app/lmstudio/AppRun --no-sandbox\n\
|
||||
' > /start-app.sh && chmod +x /start-app.sh
|
||||
|
||||
CMD ["/start-app.sh"]
|
||||
|
||||
#> apt-get update && apt-get install -y git x11vnc
|
||||
#> git clone https://github.com/novnc/noVNC.git /opt/noVNC
|
||||
#? x11vnc -display :99 -nopw -listen localhost -xkb -forever &
|
||||
|
||||
|
||||
|
||||
# Run LM Studio (assumes LM Studio can be run headlessly or in a server mode)
|
||||
#CMD ["./lmstudio/AppRun"]
|
||||
#CMD ["./lmstudio/AppRun", "--no-sandbox"]
|
||||
#CMD ["/bin/bash"] # interactive shell
|
||||
|
||||
|
||||
# build: docker build -t llmstudio .
|
||||
# run: docker run (-dit) -p 8980:8080 llmstudio
|
||||
# docker build -t llmstudio . && docker run -it -p 8980:8080 llmstudio
|
||||
|
||||
# cd /mnt/storage/DEV/workspace/repos/git.d-popov.com/ai-kevin/lmstudio/
|
||||
# docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -it llmstudio
|
||||
# docker build -t llmstudio . && docker run -dit -p 8980:8080 --volume /var/run/dbus:/var/run/dbus llmstudio
|
||||
# docker build -t llmstudio . && docker run -it -p 8980:8080 --volume /var/run/dbus:/var/run/dbus --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all --security-opt apparmor=unconfined llmstudio
|
||||
39
_containers/opendevin/dockerfile
Normal file
39
_containers/opendevin/dockerfile
Normal file
@@ -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"]
|
||||
12
_containers/opendevin/start-services.sh
Normal file
12
_containers/opendevin/start-services.sh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user