Parcourir la source

trim the sandbox image and install plugin dependencies in agnostic image (#2792)

* trim the sandbox image

* remove wrong code

* readd python

* readd python

* fix script

* readd nano
Shimada666 il y a 1 an
Parent
commit
82f256be96

+ 1 - 3
containers/sandbox/Dockerfile

@@ -16,13 +16,11 @@ RUN apt-get update && apt-get install -y \
     build-essential \
     openssh-server \
     sudo \
-    bash \
     gcc \
     jq \
     g++ \
     make \
     iproute2 \
-    libgl1-mesa-glx \
     && rm -rf /var/lib/apt/lists/*
 
 RUN mkdir -p -m0755 /var/run/sshd
@@ -41,4 +39,4 @@ RUN echo "" > /opendevin/bash.bashrc
 # - agentskills dependencies
 RUN /opendevin/miniforge3/bin/pip install --upgrade pip
 RUN /opendevin/miniforge3/bin/pip install jupyterlab notebook jupyter_kernel_gateway flake8
-RUN /opendevin/miniforge3/bin/pip install python-docx PyPDF2 python-pptx pylatexenc openai opencv-python
+RUN /opendevin/miniforge3/bin/pip install python-docx PyPDF2 python-pptx pylatexenc openai

+ 4 - 1
opendevin/runtime/docker/image_agnostic_util.py

@@ -23,7 +23,10 @@ def generate_dockerfile_content(base_image: str) -> str:
         '        bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3 && \\\n'
         '        chmod -R g+w /opendevin/miniforge3 && \\\n'
         '        bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"; \\\n'
-        '    fi'
+        '    fi\n'
+        'RUN /opendevin/miniforge3/bin/pip install --upgrade pip\n'
+        'RUN /opendevin/miniforge3/bin/pip install jupyterlab notebook jupyter_kernel_gateway flake8\n'
+        'RUN /opendevin/miniforge3/bin/pip install python-docx PyPDF2 python-pptx pylatexenc openai\n'
     ).strip()
     return dockerfile_content