Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Wait for the setup to complete. You should see output similar to this upon succe

![](https://github.com/user-attachments/assets/22f564f3-8622-4c6c-bb82-9c9c63dd322a)

> [!TIP]
> **Avoiding Session Timeouts**: Kaggle's interactive notebook sessions have idle timeouts. For long-running remote development, use the **"Save & Run All"** feature by clicking the **Save Version** button (top right) and selecting "Save". This runs your notebook as a background job, avoiding timeout interruptions. You can still get the zrok share token from the log screen(click active event at bottom left -> Open Logs in Viewer)

#### How to set up your public SSH key?

1. **Generate an SSH key pair** on your local machine (if you haven't already). Use a descriptive filename, for example:
Expand Down
26 changes: 9 additions & 17 deletions logging_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,32 +101,28 @@ show_success_banner() {

if command -v gum &>/dev/null; then
local header
header=$(gum style --foreground 212 --border double --border-foreground 212 --padding "1 2" --align center --width 60 "✅ Setup Complete!")
header=$(gum style --border double --padding "1 2" --align center --width 60 "✅ Setup Complete!")
local message
message=$(gum style --foreground 255 --align center --width 60 "Your Kaggle instance is ready for remote access!")
message=$(gum style --align center --width 60 "Your Kaggle instance is ready for remote access!")

local token_label
token_label=$(gum style --foreground 99 "📡 Zrok Share Token:")
token_label=$(gum style "📡 Zrok Share Token:")
local token_value
token_value=$(gum style --foreground 212 --bold "$share_token")
token_value=$(gum style "$share_token")
local token_section
token_section=$(gum join --vertical --align center "$token_label" "$token_value")
local token_box
token_box=$(gum style --border rounded --padding "1 2" --border-foreground 99 --width 60 --align center "$token_section")
token_box=$(gum style --border rounded --padding "1 2" --width 60 --align center "$token_section")

local instr_label
instr_label=$(gum style --foreground 255 "🖥️ On your LOCAL machine, run:")
instr_label=$(gum style "🖥️ On your LOCAL machine, run:")
local cmd1
cmd1=$(gum style --foreground 212 "zrok access private $share_token")
local cmd2_label
cmd2_label=$(gum style --foreground 255 "Then connect via SSH:")
local cmd2
cmd2=$(gum style --foreground 212 "ssh -p 9191 root@127.0.0.1")
cmd1=$(gum style "zrok access private $share_token")

local cmds_content
cmds_content=$(gum join --vertical --align center "$instr_label" " " "$cmd1" " " "$cmd2_label" " " "$cmd2")
cmds_content=$(gum join --vertical --align center "$instr_label" " " "$cmd1")
local cmds_box
cmds_box=$(gum style --border rounded --padding "1 2" --border-foreground 255 --width 60 --align center "$cmds_content")
cmds_box=$(gum style --border rounded --padding "1 2" --width 60 --align center "$cmds_content")

printf "\n"
gum join --vertical --align center "$header" " " "$message" " " "$token_box" " " "$cmds_box"
Expand All @@ -144,10 +140,6 @@ show_success_banner() {
echo "║ ║"
echo "║ zrok access private $share_token"
echo "║ ║"
echo "║ Then connect via SSH: ║"
echo "║ ║"
echo "║ ssh -p 9191 root@127.0.0.1 ║"
echo "║ ║"
echo "╚════════════════════════════════════════════════════════════════╝"
echo ""
fi
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_logging.bats
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ teardown() {
[[ "$output" == *"✅ Setup Complete!"* ]]
[[ "$output" == *"$test_token"* ]]
[[ "$output" == *"zrok access private $test_token"* ]]
[[ "$output" == *"ssh -p 9191 root@127.0.0.1"* ]]
[[ "$output" == *"╔"* ]] # Box drawing characters
[[ "$output" == *"╚"* ]]
}