Skip to content

Commit 5972498

Browse files
authored
No longer chown -R the miniforge3 folder (OpenHands#2566)
* No longer chown -R the miniforge3 folder * change miniforge3 group permission
1 parent 4567dd6 commit 5972498

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

containers/sandbox/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
3434
RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs
3535
RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
3636
RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3
37+
RUN chmod -R g+w /opendevin/miniforge3
3738
RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"
3839
RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> ~/.bashrc
3940
RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> /opendevin/bash.bashrc

opendevin/runtime/docker/ssh_box.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,6 @@ def setup_user(self):
361361
raise Exception(
362362
f'An error occurred while checking if miniforge3 directory exists: {logs}'
363363
)
364-
# chown the miniforge3
365-
exit_code, logs = self.container.exec_run(
366-
['/bin/bash', '-c', 'chown -R opendevin:root /opendevin/miniforge3'],
367-
workdir=self.sandbox_workspace_dir,
368-
environment=self._env,
369-
)
370-
if exit_code != 0:
371-
raise Exception(
372-
f'Failed to chown miniforge3 directory for opendevin in sandbox: {logs}'
373-
)
374364
exit_code, logs = self.container.exec_run(
375365
[
376366
'/bin/bash',

0 commit comments

Comments
 (0)