Skip to content

Commit

Permalink
asdfasdf
Browse files Browse the repository at this point in the history
  • Loading branch information
adnan wahab committed Oct 19, 2024
1 parent c14ff66 commit c811914
Show file tree
Hide file tree
Showing 42 changed files with 780 additions and 469 deletions.
1 change: 1 addition & 0 deletions actions
1 change: 1 addition & 0 deletions cartoons
1 change: 1 addition & 0 deletions comics
Empty file removed docs/blog.html
Empty file.
Empty file removed docs/homepage.html
Empty file.
Empty file removed docs/robotics-odyssey.html
Empty file.
1 change: 1 addition & 0 deletions embeddings
1 change: 1 addition & 0 deletions intermediate_representations
1 change: 1 addition & 0 deletions logs
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "dependencies": { "express": "^4.21.1", "http-proxy-middleware": "^3.0.3" } }
85 changes: 49 additions & 36 deletions scripts/_bootstrap.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Symlink each category into a data folder in the root of this git repo
chmod +x scripts/*
ln -s ~/derp/actions ~/homelab_status_page/actions
ln -s ~/derp/cartoons ~/homelab_status_page/cartoons
ln -s ~/derp/comics ~/homelab_status_page/comics
ln -s ~/derp/embeddings ~/homelab_status_page/embeddings
ln -s ~/derp/intermediate_representations ~/homelab_status_page/intermediate_representations
ln -s ~/derp/logs ~/homelab_status_page/logs
ln -s ~/derp/sensor_data ~/homelab_status_page/sensor_data

#cp ~/homelab_status_page/scripts/homelab_status_page.sh /usr/local/bin/homelab_status_page.sh

#docker
#bun
#caddy
Expand Down Expand Up @@ -473,57 +485,57 @@ install_portainer
# passowrd nviida

#Update Docker's daemon.json to set the default runtime to nvidia
if [ -f /etc/docker/daemon.json ]; then
sudo jq '. + {"runtimes": {"nvidia": {"path": "nvidia-container-runtime", "runtimeArgs": []}}, "default-runtime": "nvidia"}' /etc/docker/daemon.json | sudo tee /etc/docker/daemon.json.tmp
sudo mv /etc/docker/daemon.json.tmp /etc/docker/daemon.json
else
echo '{"runtimes": {"nvidia": {"path": "nvidia-container-runtime", "runtimeArgs": []}}, "default-runtime": "nvidia"}' | sudo tee /etc/docker/daemon.json
fi
# if [ -f /etc/docker/daemon.json ]; then
# sudo jq '. + {"runtimes": {"nvidia": {"path": "nvidia-container-runtime", "runtimeArgs": []}}, "default-runtime": "nvidia"}' /etc/docker/daemon.json | sudo tee /etc/docker/daemon.json.tmp
# sudo mv /etc/docker/daemon.json.tmp /etc/docker/daemon.json
# else
# echo '{"runtimes": {"nvidia": {"path": "nvidia-container-runtime", "runtimeArgs": []}}, "default-runtime": "nvidia"}' | sudo tee /etc/docker/daemon.json
# fi


# Add data-root configuration to Docker's daemon.json
if [ -f /etc/docker/daemon.json ]; then
sudo jq '. + {"data-root": "/mnt/docker"}' /etc/docker/daemon.json | sudo tee /etc/docker/daemon.json.tmp
sudo mv /etc/docker/daemon.json.tmp /etc/docker/daemon.json
else
echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json
fi
# # Add data-root configuration to Docker's daemon.json
# if [ -f /etc/docker/daemon.json ]; then
# sudo jq '. + {"data-root": "/mnt/docker"}' /etc/docker/daemon.json | sudo tee /etc/docker/daemon.json.tmp
# sudo mv /etc/docker/daemon.json.tmp /etc/docker/daemon.json
# else
# echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json
# fi


# Restart Docker to apply changes

git clone https://github.com/dusty-nv/jetson-containers
# git clone https://github.com/dusty-nv/jetson-containers

sudo systemctl restart docker
bash jetson-containers/install.sh
# sudo systemctl restart docker
# bash jetson-containers/install.sh


hello() {
echo "hello"
curl -fsSL https://bun.sh/install | bash
source /home/adnan/.bashrc
# hello() {
# echo "hello"
# curl -fsSL https://bun.sh/install | bash
# source /home/adnan/.bashrc

}
# }

install_rustdesk() {
# Update package list and install dependencies
sudo apt-get update
sudo apt-get install -y wget gdebi-core
# install_rustdesk() {
# # Update package list and install dependencies
# sudo apt-get update
# sudo apt-get install -y wget gdebi-core

# Download the RustDesk .deb package
wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.deb
# # Download the RustDesk .deb package
# wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.deb

# Install the RustDesk package
sudo gdebi -n rustdesk-1.1.9.deb
# # Install the RustDesk package
# sudo gdebi -n rustdesk-1.1.9.deb

# Clean up the downloaded .deb file
rm rustdesk-1.1.9.deb
# # Clean up the downloaded .deb file
# rm rustdesk-1.1.9.deb

echo "RustDesk installation completed."
}
# echo "RustDesk installation completed."
# }

# Call the function to install RustDesk
install_rustdesk
# # Call the function to install RustDesk
# install_rustdesk


#sudo docker run --runtime nvidia -it --rm --network=host dustynv/l4t-pytorch:r36.2.0
Expand All @@ -544,11 +556,12 @@ install_rustdesk

# docker pull ollama/ollama
# docker run -it --gpus all ollama/ollama
sudo apt-get update && sudo apt-get install v4l2loopback-dkms
#sudo apt-get update && sudo apt-get install v4l2loopback-dkms


# adnan@jetson-orin:~$ docker run --runtime nvidia --rm -it \
# --gpus all \
# --device /dev/video0 \
# --device /dev/video1 \
# dustynv/jupyterlab:r36.2.0

Empty file modified scripts/_course_gen.sh
100644 → 100755
Empty file.
Empty file modified scripts/_course_gen_step_2.js
100644 → 100755
Empty file.
Empty file modified scripts/components_specs.md
100644 → 100755
Empty file.
Empty file modified scripts/config.toml
100644 → 100755
Empty file.
Empty file modified scripts/config.yml
100644 → 100755
Empty file.
Empty file modified scripts/course_gen_step_2.js
100644 → 100755
Empty file.
Empty file modified scripts/course_gen_step_2.py
100644 → 100755
Empty file.
Empty file modified scripts/download_notebooks.py
100644 → 100755
Empty file.
Empty file modified scripts/flake.nix
100644 → 100755
Empty file.
71 changes: 71 additions & 0 deletions scripts/homelab_status_page.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# Launcher for homelab_status_page build.sh, run.sh, and autotag

ROOT="$(dirname "$(readlink -f "$0")")"
COMMAND=$1

shift;

if [ -z "$COMMAND" ]; then
COMMAND="restart-blog"
fi

if [ "$COMMAND" = "build" ] || [ "$COMMAND" = "build.sh" ]; then
#$ROOT/build.sh "$@"
echo "Running run.sh..."
elif [ "$COMMAND" = "run" ] || [ "$COMMAND" = "run.sh" ]; then
#$ROOT/run.sh "$@"
echo "Running run.sh..."
elif [ "$COMMAND" = "list" ]; then
# $ROOT/build.sh --list "$@"
echo "Running run.sh..."

elif [ "$COMMAND" = "show" ]; then
#$ROOT/build.sh --show "$@"
echo "Running run.sh..."

elif [ "$COMMAND" = "autotag" ]; then
#$ROOT/autotag "$@"
echo "Running run.sh..."

elif [ "$COMMAND" = "update" ]; then
# cd $ROOT
#git pull
echo "Running run.sh..."

elif [ "$COMMAND" = "root" ]; then
echo $ROOT
elif [ "$COMMAND" = "data" ]; then
echo $ROOT/data
elif [ "$COMMAND" = "install" ]; then
echo "Running install..."
# Add your install command logic here
elif [ "$COMMAND" = "bootstrap" ]; then
echo "Running bootstrap..."
bash ~/homelab_status_page/scripts/_bootstrap.sh
elif [ "$COMMAND" = "restart-blog" ]; then
echo "Running restart-blog..."
#bash ~/homelab_status_page/scripts/_bootstrap.sh
bash ~/homelab_status_page/scripts/restart-blog.sh

# Add your restart-blog command logic here
else
#echo 'default PARAM - no toher requests currently - restarting blag for fun !?!?!'
# echo 'homelab_status_page > Invalid command'
# echo ''
# echo ' * build [PACKAGES]'
# echo ' * run OPTIONS [CONTAINER:TAG] CMD'
# echo ' * list [PACKAGES|*'
# echo ' * show [PACKAGES]*'
# echo ' * autotag [CONTAINER]'
# echo ' * update (runs git pull)'
# echo ' * root (prints repo path)'
# echo ' * data (prints data path)'
# echo ' * install'
# echo ' * bootstrap'
# echo ' * restart-blog (default)'
# echo ''
# echo 'Run "jetson-containers <CMD> --help" for more info.'
bash ~/homelab_status_page/scripts/restart-blog.sh
exit 1
fi
15 changes: 10 additions & 5 deletions scripts/infra/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,23 @@ hashirama.blog {
#reverse_proxy localhost:8080
}

route /portainer/* {
reverse_proxy localhost:9443
}

route /portainer_2/* {
route /portainer {
reverse_proxy localhost:9000
}

route /immich/* {
reverse_proxy localhost:2283
}

# route /caddy_proxy/* {
# reverse_proxy /youtube https://www.youtube.com {
# header_up Host {http.reverse_proxy.upstream.hostport}
# header_up X-Real-IP {remote}
# header_up X-Forwarded-For {remote}
# header_up X-Forwarded-Proto {scheme}
# }
# }

# route /ws/* {
# reverse_proxy localhost:8080
# }
Expand Down
Empty file modified scripts/print_markdown_table.sh
100644 → 100755
Empty file.
Empty file modified scripts/remove_comments.py
100644 → 100755
Empty file.
Empty file modified scripts/remove_comments.sh
100644 → 100755
Empty file.
26 changes: 24 additions & 2 deletions scripts/restart-blog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,27 @@ sudo systemctl enable homelab_status_page.service
sudo systemctl start homelab_status_page.service


#sudo systemctl status homelab_status_page.service
alias restart="bash scripts/restart-blog.sh"
#ln -s /usr/local/bin/homelab_status_page.sh ~/homelab_status_page/scripts/homelab_status_page.sh



# Start Portainer service
echo "Starting Portainer service..."
if sudo systemctl start portainer; then
echo "Portainer service started successfully."
else
echo "Failed to start Portainer service. Checking status..."
sudo systemctl status portainer
echo "Checking journal logs for more information..."
sudo journalctl -u portainer -n 50 --no-pager
fi

# Check Portainer status
echo "Checking Portainer status..."
if systemctl is-active --quiet portainer; then
echo "Portainer is running."
else
echo "Error: Portainer is not running."
sudo systemctl status portainer
exit 1
fi
Empty file modified scripts/zoox_comprehension.py
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions sensor_data
5 changes: 2 additions & 3 deletions web-ui/js/blag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,10 @@ function Blog () {
<div class="container mx-auto px-4">
<section class="mb-6">
<h2 id="memory-updated" class="text-3xl font-bold mb-4">
<a id="memory-updated" href="/robotics-odyssey"
<a id="memory-updated" href="https://robotics-odyssey.com"
>Launch: Robotics Odyssey - oct 10 midnight




<img
alt=""
src="https://files.hashirama.blog/static/blog/5.png"
Expand Down
File renamed without changes.
25 changes: 25 additions & 0 deletions web-ui/js/bun_handlers/cgi-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,31 @@ const routes = {
// '/comment-visualizer-remover' : () => {

// },
// spline proxy api
"fs-visual-ncdu" : () => {},

"3d-transform-designer-from-video-periodic-truth-fma" : () => {},
"book_to_comic_book": () => {
return new Response("book_to_comic_book", {
headers: {
"Content-Type": "text/html",
},
});
},
"comic_book_to_video": () => {
return new Response("domo+replicate", {
headers: {
"Content-Type": "text/html",
},
});
},
"/webgpu-streaming-streaming": () => {
return new Response("webgpu-streaming-streaming", {
headers: {
"Content-Type": "text/html",
},
});
},

'/voice_reactive_particles': () => {
/// static html
Expand Down
Loading

0 comments on commit c811914

Please sign in to comment.