Skip to content

Instantly share code, notes, and snippets.

View jgwill's full-sized avatar

Guillaume Descoteaux-Isabelle jgwill

View GitHub Profile
@jgwill
jgwill / 05-init-linux-infrastructure.sh
Last active July 8, 2023 16:34
giaupscayl-prototyping-2307-infraless
input_file=test-img-lowres.jpg
output_base=_test-img-lowres-upres-gia
model_name="realesrgan-x4plus-anime"
#Init
sudo mkdir -p -m 777 /repos
cd /repos && git clone https://github.com/GuillaumeAI/giar-Real-ESRGAN.git \
&& cd giar-Real-ESRGAN
@jgwill
jgwill / gia-upscayler-env-setup.README.md
Last active June 12, 2023 19:07
gia-upscayler-env-setup @stcgoal Experimental attempt to package a Generative Adversarial Networking to Uprez Images

Installation

Env

conda create -n py310ESRGAN python=3.10 anacond

Activate

@jgwill
jgwill / vscode.README.md
Last active June 9, 2023 16:15
Terminal with Conda activating specific environment

Terminal with Conda activating specific environment

Specifically

"Conda PS 7 py310ESRGAN": {
      "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
      "args": ["-NoExit","-Command"," C:\\usr\\local\\anaconda\\shell\\condabin\\conda-hook.ps1 ; conda activate py310ESRGAN"]
    },
@jgwill
jgwill / rm-parenthesis-in-files-renamer.sh
Created December 28, 2022 03:41
Bash Rename files with parenthesis and remove them
cdir=$(pwd);for d in $(cat _dist.txt);do cd $d;for f in *;do echo $f;fx1=${f//\(/_};fx=${fx1//\)/};mv "$f" "$fx";done;cd $cdir;done
@jgwill
jgwill / dk-extract-apt-package
Created December 13, 2022 03:56
Extract what apt package are in the Dockerfile
cat Dockerfile.tmp | \
sed 's/\# RUN/#ABC/g' | \
sed 's/\#RUN/#ABC/g'| awk '/RUN apt/' | \
sed 's/RUN apt-get -y install//g' | \
sed 's/RUN apt-get install -y//g' | \
awk '/RUN apt/' | \
sed 's/RUN apt -y install//g' | \
sed 's/RUN apt install -y//g' | \
sed 's/--fix-missing//g'
##>> Dockerfile
@jgwill
jgwill / json.lua
Created November 13, 2022 01:43 — forked from tylerneylon/json.lua
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@jgwill
jgwill / 00-odinsr-awk-create-tailer.sh
Last active November 9, 2022 21:15
Odin SR -Create tailer
#!/bin/bash
cat _srrun_221109.sh | awk '/ bg/ { print "tail -f conf/logs/"$2".log &" }'
@jgwill
jgwill / 00-status-WSL-Ubuntu-setup-20112611.md
Last active May 9, 2022 19:26
WSL Ubuntu setup 2011261142

Docker Desktop WSL 2 backend is not supported yet with GPUs. You will have to install Docker as you would traditionally in Linux for WSL 2 and then install NVIDIA Container Toolkit (or nvidia-docker2) for now. nvidia-container-toolkit and nvidia-docker2 in the end are just wrappers. There is a slight variation depending on which version of Docker you use (19.03 vs. 18.09), but if you chose to install nvidia-docker2, then that works across both releases of Docker. I’ll look into making that more clear in the documentation. nvidia-smi does not work because we don’t support NVML in WSL 2 yet - this is part of the Known Limitations in the user-guide. We will be adding support for it in the near future. >https://forums.developer.nvidia.com/t/hiccups-setting-up-wsl2-cuda/128641

@jgwill
jgwill / 00-ocireg__ast__install-220429.sh
Last active April 30, 2022 02:04
Install AST on Windows for ocireG 220429
docker pull guillaumeai/server:ast-210606-singleone-v1-dev
@jgwill
jgwill / 00-gaia-cuda-install-220410-gpu-on-WSL
Last active April 10, 2022 09:48
x to run GPU NVIDIA on Gaia Windows - @stcgoal WSL GPU AST Training
# Inspired from :https://ubuntu.com/tutorials/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform#3-install-nvidia-cuda-on-ubuntu
# Notes: the steps did not worked as written
# here is my order:
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda-repo-wsl-ubuntu-11-4-local_11.4.0-1_amd64.deb