Skip to content

πŸ™Œ OpenHands: AI-Driven Development

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

Shimada6665972498e23c6
diff --git a/containers/sandbox/Dockerfile b/containers/sandbox/Dockerfile
index e822089d8f..c949d6d913 100644
--- a/containers/sandbox/Dockerfile
+++ b/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
diff --git a/opendevin/runtime/docker/ssh_box.py b/opendevin/runtime/docker/ssh_box.py
index 04b8c10a86..510a87615b 100644
--- a/opendevin/runtime/docker/ssh_box.py
+++ b/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',