sync docker files with cocalc account

13 views
Skip to first unread message

Juan Carlos Bustamante

unread,
Mar 15, 2023, 8:20:48 PM3/15/23
to CoCalc
Hi there,
I asked something similar some years ago, but hitng may have changed.

Is there a way to combine the docker image (to work locally, taking advantage of my machine, not depending on internet connection), and a cocalc project (paid account, making it possible to actually collaborate with someone else)?

Kind regards,

JC

Harald Schilly

unread,
Mar 16, 2023, 5:27:20 AM3/16/23
to Juan Carlos Bustamante, CoCalc
Hello Juan,

The first thing that comes to my mind is syncing files up/down using rsync via SSH. That's of course not real-time, rather manual syncing.

What's new is that it is possible to mount a file-system in a cocalc.com project: https://doc.cocalc.com/project-settings.html#cloud-storage-remote-file-systems

If you have a server running SSH, you could mount that into your online project and use sshfs locally on your machine, and mount the same files into the file-system that's being used by cocalc docker.
So, with that, both worlds will eventually sync up to a common ground.

Or, a similar idea as a twist of the above: you could mount a CoCalc project's files locally via sshfs. I.e. after adding your public key to your project, you can do:

mkdir proj
sshfs [project UUID without dashes]@ssh.cocalc.com:/home/user proj/

where yet again, that "proj" mountpoint is in the file-system docker is using.

Maybe that gives you some ideas of what you could do. 

-- Harald







--
CoCalc: Collaborative Calculation in the Cloud -- https://cocalc.com
---
You received this message because you are subscribed to the Google Groups "CoCalc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocalc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cocalc/4941915a-278d-4983-a038-6d40f7ac188bn%40googlegroups.com.

William Stein

unread,
Mar 16, 2023, 12:22:24 PM3/16/23
to Juan Carlos Bustamante, CoCalc
Actually doing precisely what you're describing here is something I've
wanted to implement for a long time. I've thought through a few times
how it might work, and it would be pretty cool. Unfortunately, I
still haven't implemented it.

For anybody else who is reading this, the idea is that all of the
TimeTravel / realtime sync information would get syncd between a local
cocalc-docker (or electron, etc.,) instance and the main cocalc.com
servers. This would make it possible to run cocalc on your own
computer, but fully participate in realtime sync with other users.
A good way to think about this is basically just replacing the web
browser (as a client to cocalc.com) with web browser + local compute
(e.g, via docker). That's all -- it would just extend what a
cocalc.com client can do. It might also make sense to have a vscode
plugin that connect to cocalc.com and provides a similar link.

Implementing something like this is inevitably going to happen at some
point, since it's so powerful and useful. However, it hasn't happened
yet. A tricky part is figuring out where the filesystem for a project
lives or how it is sync'd, and Harald's message above has some good
ideas about how to do that.

This is somewhat related: https://github.com/sagemathinc/cocalc-compute




--
William (http://wstein.org)
Reply all
Reply to author
Forward
0 new messages