40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
# 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"]
|