Преглед на файлове

No longer chown -R the miniforge3 folder (#2566)

* No longer chown -R the miniforge3 folder

* change miniforge3 group permission
Shimada666 преди 1 година
родител
ревизия
5972498e23
променени са 2 файла, в които са добавени 1 реда и са изтрити 10 реда
  1. 1 0
      containers/sandbox/Dockerfile
  2. 0 10
      opendevin/runtime/docker/ssh_box.py

+ 1 - 0
containers/sandbox/Dockerfile

@@ -34,6 +34,7 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
 RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs
 RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
 RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3
+RUN chmod -R g+w /opendevin/miniforge3
 RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"
 RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> ~/.bashrc
 RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> /opendevin/bash.bashrc

+ 0 - 10
opendevin/runtime/docker/ssh_box.py

@@ -361,16 +361,6 @@ class DockerSSHBox(Sandbox):
                     raise Exception(
                         f'An error occurred while checking if miniforge3 directory exists: {logs}'
                     )
-            # chown the miniforge3
-            exit_code, logs = self.container.exec_run(
-                ['/bin/bash', '-c', 'chown -R opendevin:root /opendevin/miniforge3'],
-                workdir=self.sandbox_workspace_dir,
-                environment=self._env,
-            )
-            if exit_code != 0:
-                raise Exception(
-                    f'Failed to chown miniforge3 directory for opendevin in sandbox: {logs}'
-                )
             exit_code, logs = self.container.exec_run(
                 [
                     '/bin/bash',