misc settings, ymls and cmds
This commit is contained in:
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