feat: replace runtime ubuntu image with custom snek_ubuntu and move r binary into Dockerfile

Add DockerfileUbuntu that pre-installs r binary and all required system dependencies, removing the need for per-container apt installs and binary copy from .bashrc. Update terminal view to use the new snek_ubuntu image instead of ubuntu:latest. Fix terminal session buffer check to use self.history instead of self.buffer. Add docker build target to Makefile.
This commit is contained in:
2025-03-28 01:41:57 +00:00
parent 51d0ca1bc5
commit 9e9f317853
6 changed files with 20 additions and 8 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ class TerminalSession:
async def read_output(self, ws):
self.sockets.append(ws)
if len(self.sockets) > 1 and self.buffer:
if len(self.sockets) > 1 and self.history:
start = 0
try:
start = self.history.index(b'\n')
+4 -1
View File
@@ -30,7 +30,10 @@ class TerminalSocketView(BaseView):
user = await self.services.user.get(uid=self.session.get("uid"))
root = await self.prepare_drive()
command = f"docker run -v ./{root}/:/root --rm -it --memory 512M --cpus=0.5 -w /root ubuntu:latest /bin/bash"
command = f"docker run -v ./{root}/:/root -it --memory 512M --cpus=0.5 -w /root snek_ubuntu /bin/bash"
session = self.user_sessions.get(user["uid"])
if not session: