Open SyntaxColoring opened 2 years ago
git is very useful for users like me - so that code of utilities working on opentrons is taken/stored at git repo, not just laying on the robot
@arogozhnikov Thanks for your feedback.
Can you tell us a little more about how you're using Git on the robot? Are you doing something like this?
# SSH into the robot.
$ ssh -i $MY_SSH_KEY root@$MY_ROBOT_IP_ADDRESS
# Now that we're on the robot, use Git to download files from a remote repository.
cd /data/user_storage/my_repo
git pull
If so, could you replace that with something like this?
# On your PC, use Git to get the latest files.
cd ~/my_repo
git pull
# Delete any old files on the robot.
ssh -i $MY_SSH_KEY root@$MY_ROBOT_IP_ADDRESS rm -rf /data/user_storage/my_repo
# Use scp to push the latest files from your PC to the robot.
scp -i $MY_SSH_KEY -r ~/my_repo root@$MY_ROBOT_IP_ADDRESS:/data/user_storage/my_repo
@SyntaxColoring it is a two-way sync (notebooks from robot stored to the repo)
Would rsync
work instead of git
?
The robot doesn't currently have rsync
installed. I don't know if it would actually be smaller than git
, but it might be.
I think rsync would do.
But
May I ask why you say 'low on space'?
E.g. it looks I have 16Gb on robot and I'm happy to spend 3-4Gb to get more tools rather than suffering from sh
(that doesn't even support readline)... or from missing nano/git ... or missing ssh client. Example: your support recommends using reverse tunnel, but there is no ssh client on robot 🤷
May I ask why you say 'low on space'?
E.g. it looks I have 16Gb on robot [...]
It has to do with the way the SD card is partitioned. The whole card does indeed have plenty of space. That's the 16 GB you're seeing. But the root partition only has something like 312 MB.
Our robot software updates work by atomically overwriting the whole root partition, basically leaving the rest of the SD card alone. So all of our executables and libraries live on the root partition. This can and has filled up its 312 MB beyond the conventional 95% limit, to the point where it couldn't even fit a few additional Python packages.
I'm happy to spend 3-4Gb to get more tools rather than suffering from sh (that doesn't even support readline)... or from missing nano/git ... or missing ssh client. Example: your support recommends using reverse tunnel, but there is no ssh client on robot 🤷
Agreed. It's just a matter of unlocking the rest of the 16 GB.
We're pursuing an approach like this:
Let's see how it goes. Userspace binaries should work (though registry with binaries would help).
As for python packages - I've tried scipy / pillow, but neither worked (unsurprisingly). Not that it I need it right now, but I have to lower my expectations from 'I have a machine that can orchestrate things in the lab with flexibility of python' to 'I shouldn't expect more than liquid handling'.
This issue follows up on #143 by aggregating further ideas to free up space on the filesystem. (Other Opentrons folks, feel free to edit this list.)
This PR added
git
,curl
, andwget
.git
? Do we really need bothcurl
andwget
, or can we just pick one?Busybox has its own implementations of
curl
and/orwget
(can't remember which, exactly). So we have two implementations installed. Can we get rid of one? Are we accidentally doing this with any other commands?i2ctools
ande2fsprogs
if I'm reading this right?Don't need busybox
crond
andcrontab
because we have systemd for thathalt
, etc.Should we strip test files from Python packages, sort of automating the workaround in Opentrons/opentrons#8184?
~Strip out all the bluetooth stuff. this was a temporary experiment that at this point I [@sfoster1] think is not going to happen~
i [@sfoster1] doubt we need screen or tmux but they're also tiny so whatever
See also https://github.com/Opentrons/opentrons/issues/8184, which has some investigation for what counts as "full."