Skip to content

Commit

Permalink
add workspace.lock function to make an environment readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
markusgrotz committed Dec 7, 2023
1 parent 33d38ff commit fad20bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aurmr_setup/core/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ def install(self, package):
cmd = f"mamba install {package}"
subprocess.run(cmd, check=True, shell=True)

def lock(self):
cmd = f"chmod -R -w $HOME/miniconda3/envs/{self.workspace_name}"
subprocess.run(cmd, check=True, shell=True)
cmd = f"chmod -R -w $HOME/workspaces/{self.workspace_name}/src"
subprocess.run(cmd, check=True, shell=True)


def import_from_archive(self):
""" """
import shutil
Expand Down

0 comments on commit fad20bf

Please sign in to comment.