Development

image

CG

Dreamworks animation (DWA) usd-manager

https://github.com/dreamworksanimation/usdmanager

# virtualenv
python310 -m virtualenv venv
.\venv\scripts\activate

#  branch: python3

python setup.py install
pip install PySide2

python .\build\scripts-3.10\usdmanager

AYON

AYON Frontend

REM
REM ayon-frontend
REM If you don,t have yarn, you can install it by `npm install -g yarn`
REM

cd C:\src\ayon\ayon-frontend

yarn install
yarn build

AYON launcher

#
# ayon-launcher
# 1. On Windows, You need install iscc.exe by scoop install inno-setup
# 2. python39 -m virtualenv ./venv
# 

cd c:\src\ayon\ayon-launcher

# proxy setup if needed.

.\venv\scripts\activate

./tools/manage.ps1 create-env
./tools/manage.ps1 install-runtime-dependencies
./tools/manage.ps1 build
./tools/manage.ps1 make-installer

AYON Dependencies Tools

# 创建.env文件, 这个apiKey是从项目文件,找一张有图片的,在浏览器按F12,定位元素到这种图片,在url中会显示token,将token填入下方
: AYON_API_KEY=
: AYON_SERVER_URL=http://<addr>:<port>

cd C:\src\ayon\ayon-dependencies-tool

# Change python version same as your project, for me for now, it's python3.9.13, my system has 3 versions of python, 3.9,3.10,3.11, and installed by scoop, commonly I use virtualenv, but I removed the default scoop-shims of python.exe,python3.exe, and only keep the python39,python310,python311 on my system.

.\start.ps1 install
.\start.ps1 create -b <bundle_name>

AYON addons

# from self
# 1. use https://github.com/ynput/ayon-addon-template to create your own addon or clone the official addon repository
# 2. create a python virtualenv that version compatibility with your project (for now 24.01.17, needs python3.9.13), after create it, activate it. then run
poetry run python create_package.py
# from openpype (all)
cd c:\src\ayon\openpype
./.poetry/bin/poetry run python ./server_addon/create_ayon_addons.py

AYON Documentation

# Install yarn if needed
# npm install -g yarn
yarn add docusaurus --dev
cd website
yarn start

AYON Docker

(for windows Docker Desktop) - Recommand

# powershell
cd C:\src\ayon\ayon-docker

# If you have one, you can speed it up
$env:http_proxy = "http://localhost:10809"
$env:https_proxy = "http://localhost:10809"

# from template.json to server
#  exection only once need.
.\manage.ps1 setup

# Use official docker image
.\manage.ps1 update

# build whole things (from local)
.\manage.ps1 build

AYON Backend

(for windows WSL)

#!/bin/bash

# Windows (WSL)

#
# On Windows (Outside WSL) - Port Forward
# - Use `wsl -- ifconfig eth0` get wsl-ip, then:
# netsh interface portproxy add v4tov4 listenport=5000 listenaddress=0.0.0.0 connectport=5000 connectaddress=<wsl-ip>
# netsh interface portproxy show all
# netsh interface portproxy delete v4tov4 listenport=5000 listenaddress=0.0.0.0
#

#
# On WSL - Install Project (user environment, root is ok.)
# - If you have better network for pip, You don't need this line.
# export http_proxy=http://<address>:<port>
# export https_proxy=http://<address>:<port>
# pip install -U pip
# pip install poetry
# poetry config virtualenvs.create false
# python3 -m virtualenv /home/<user>/venv-ayon
# source /home/<user>/venv-ayon/bin/activate
# cd /mnt/c/src/ayon/ayon-backend
# poetry install --no-interaction --no-ansi
#

#
# On noth (Manual)
# - Windows
# wsl --shutdown -d Ubuntu-22.04
# wsl -d Ubuntu-22.04
# - WSL (ayon.pid, backend-server need, for non-root user only.)
# sudo touch /var/run/ayon.pid
# sudo chown <user> /var/run/ayon.pid
#

#
# ! Need yarn build frontend first.
#

# sh /mnt/c/src/ayon/ayon-backend.sh

. /home/<user>/venv-ayon/bin/activate

echo <password> | sudo -S touch /var/run/ayon.pid
echo <password> | sudo -S chown <user> /var/run/ayon.pid

# host_ip=$(cat /etc/resolv.conf |grep "nameserver" |cut -f 2 -d " ")
# export ALL_PROXY="http://$host_ip:<port>"

export AYON_postgres_url=postgres://<username>:<password>@<addr>:<port>/ayon
export AYON_redis_url=redis://<username>:<password>@<addr>:<port>

export AYON_frontend_dir=/mnt/c/src/ayon/ayon-frontend/dist
export AYON_addons_dir=/mnt/c/src/ayon/ayon-addons/dist
export AYON_log_file=/mnt/c/src/ayon/log-backend.log
export AYON_SETTINGS_TEMPLATE=/mnt/c/src/ayon/template.json
export AYON_force_create_admin=1
export AYON_auth_pass_pepper=<secure_password>

export PYTHONBUFFERED=1
export LOGLEVEL=info

cd /mnt/c/src/ayon/ayon-backend

gunicorn \
  -k uvicorn.workers.UvicornWorker \
  --log-level ${LOGLEVEL} \
  --timeout 120 \
  -b :5000 \
  ayon_server.api.server:app

AYON Openpype (Deprecated)

更详细: CG Pipeline

GitHub - ynput/OpenPype: Main OpenPype repository and AYON openpype addon codebase

开源Pipeline管理工具。

# python version 3.9.13
$Env:http_proxy = "http://localhost:10809"
$Env:https_proxy = "http://localhost:10809"
.\tools\create_env.ps1
.\tools\fetch_thirdparty_libs.ps1
.\tools\build.ps1

Armory

ArmorCore

cd armorcore
# Unpack `v8\libraries\win32\release\v8_monolithz` using 7-Zip - Extract Here (exceeds 100MB)
.\Kinc\make.bat -g direct3d11

ArmorPaint

GitHub - armory3d/armortools: 3D Content Creation Tools

贴图绘制软件。

# 解压 `..\armorcore\v8\libraries\win32\release\v8_monolithz` using 7-Zip - Extract Here (exceeds 100MB)

# 生成工程
cd c:/src/armortools/armorpaint
..\armorcore\Kinc\make --from ..\armorcore -g direct3d11

# 在"build\ArmorPaint.sln"中打开生成的 Visual Studio 项目针对 x64 和Release进行构建和运行

# Copy build\x64\Release\ArmorPaint.exe to build\krom to run ArmorPaint.exe directly

Armory3D

GitHub - armory3d/armory: 3D Engine with Blender Integration

一个游戏引擎,可以在 Blender 中构建游戏。

ArmorLab

AI驱动的纹理创作工具,图片或文字->贴图。

cd armortools/armorlab
git clone https://github.com/armory3d/onnx_bin onnx
# Unpack `models.zip` from https://github.com/armory3d/armorai/releases into `Assets/models` using 7-Zip - Extract Here

# Unpack `..\armorcore\v8\libraries\win32\release\v8_monolithz` using 7-Zip - Extract Here (exceeds 100MB)
..\armorcore\Kinc\make --from ..\armorcore -g direct3d11

OpenUSD

GitHub - PixarAnimationStudios/OpenUSD: Universal Scene Description

数据交换格式。

构建

# python version 3.10.11
# run `x64 Native Tools Command Prompt for VS 2022`
# for download usd-src
set http_proxy=http://localhost:10809
set https_proxy=http://localhost:10809
# venv
python -m pip install virtualenv
python -m virtualenv C:/src/OpenUSD/venv
call C:/src/OpenUSD/venv/Scripts/activate
# for usdview
pip install PyOpenGL
pip install PySide6
pip install opencolorio
pip install numpy
# for usdSchemaGen
pip install jinja2
# build dry run, to build remove -n option
python .\build_scripts\build_usd.py --materialx --draco --alembic --hdf5 --openimageio --opencolorio --embree --openvdb --ptex --prman --test --build-variant=relwithdebuginfo --src=c:\data\build\usd-src --build-args=USD,"-DPXR_ENABLE_VULKAN_SUPPORT=FALSE -DRENDERMAN_LOCATION=C:/data/plugins/RenderManProServer-25.2" c:\data\build\usd-build –n

Schema

usdGenSchema [schemaPath] [codeGenPath]

Blender

Blender Developer Wiki

开源全功能的DCC软件。

git clone https://projects.blender.org/blender/blender.git
cd C:\src\blender-git\blender
make update
make full nobuild

QuiltiX

GitHub - PrismPipeline/QuiltiX: QuiltiX is a graphical node editor to edit, and author MaterialX based materials of 3D assets

基于节点的MaterialX材质编辑。

python version 3.9.13

# via pypi (install)
pip install QuiltiX
pip install git+https://github.com/PrismPipeline/OpenUSD_build.git@23.11-win-mtlx-1.38.8

# run
python -m QuiltiX

gatling

GitHub - pablode/gatling: Hydra-enabled GPU path tracer that supports MaterialX and MDL

Hydra光追渲染器。

cmake -B build -Wno-dev -DUSD_ROOT=%E_USD_LOCATION% -DMDL_ROOT=%E_MDLSDK_DIR% -DCMAKE_INSTALL_PREFIX=C:/data/build/gatling -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target INSTALL -- /M:8

xComp

GitHub - gugenstudio/xComp: best render comparing software in town!

cmake -B build -DCMAKE_TOOLCHAIN_FILE="%E_VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake"

cmake --build build --target xcomp --config Release

# Working-dir on 
#   C:/src/xComp/apps/xcomp/../debug_dir
# Copy _bin/Release/* to Working-dir

AI

SD-WebUI-EasyPhoto

GitHub - aigc-apps/sd-webui-EasyPhoto: 📷 EasyPhoto | Your Smart AI Photo Generator.

输入了一些右下方的图片训练出Lora后,就可以扩散风格到人物肖像上。

1702548443361

ComfyUI

GitHub - comfyanonymous/ComfyUI: The most powerful and modular stable diffusion GUI with a graph/nodes interface.

SD的图形用户界面,具有节点图。

1702519000724

Stable-diffusion-Webui

GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI

# python version 3.10.11
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

.\webui-user.bat

config

webui-user.bat

set COMMANDLINE_ARGS=--ckpt-dir <path> --lora-dir <path>

Krita-ai-diffusion

GitHub - Acly/krita-ai-diffusion: Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.

在 Krita 中使用AI生成图像的一个插件。

MiniGPT-4

GitHub - Vision-CAIR/MiniGPT-4: Open-sourced codes for MiniGPT-4 and MiniGPT-v2 (https://minigpt-4.github.io, https://minigpt-v2.github.io/)

1.我使用的Vicuna-7B,low_resource=False, 最少GPU显存 16GB。如果是True,我这里使用了10GB。
2.安装CUDA Toolkit 12/11。

1702518989918

Windows的支持

Windows not supported · Issue #28 · Vision-CAIR/MiniGPT-4 · GitHub

# 也许可以不用conda,使用virtualenv
git clone https://github.com/Vision-CAIR/MiniGPT-4.git
cd MiniGPT-4
##conda env create -f environment.yml
##conda activate minigptv

# 卸载不支持GPU版本的包
pip uninstall bitsandbytes
pip uninstall torch
# 重新安装torch与bitsandbytes
##这个不更新啦,使用下面那个
##pip install git+https://github.com/Keith-Hon/bitsandbytes-windows.git
pip install scipy
pip install bitsandbytes==0.41.2 --index-url=https://jllllll.github.io/bitsandbytes-windows-webui

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

---

python demo_v2.py --cfg-path eval_configs/minigptv2_eval.yaml  --gpu-id 0

FastChat

GitHub - lm-sys/FastChat: An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.
GPU16GB显存,加载了vicuna-7b和vicuna-13b。

git clone https://github.com/lm-sys/FastChat.git
cd FastChat
# use venv
pip3 install --upgrade pip  # enable PEP 660 support
pip3 install -e ".[model_worker,webui]"

---

# cli
python -m fastchat.serve.cli --model-path lmsys/vicuna-7b-v1.5-16k --load-8bit --cpu-offloading

# gradio
python -m fastchat.serve.controller
python -m fastchat.serve.model_worker --model-path lmsys/vicuna-7b-v1.5-16K --load-8bit --cpu-offloading
python -m fastchat.serve.gradio_web_server

Ye

ub

python开发环境

python310 -m virtualenv C:\src\Ye\src\ub\venv
# pip install dependenties with requirements.txt

Dev

(Tools)

pyside-setup

vcpkg

# download & install
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat

# qt6
...

(Python)

conda

# Shell Register
conda init cmd.exe
# Shell Unregister
conda init cmd.exe --reverse

# Update
conda update -n base -c defaults conda
## Or minimize update use
conda install conda=23.11.0

pyenv

Till the 2023-12-08,Using scoop install pyenv causing error core compoment install error. So we use this command Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1" from Installing and setting up Python - Everything I Know

在这之后,需要执行 pyenv update 去更新仓库。

Building Ye and blender warning. say python not found.

pipx

GitHub - pypa/pipx: Install and Run Python Applications in Isolated Environments

# python version 3.10.11
python -m pip install --user pipx

# add executable to environment path
python -m pipx ensurepath

pipx install pycowsay

poetry

GitHub - python-poetry/poetry: Python packaging and dependency management made easy

Install and Upgrade

python -m pipx install poetry
python -m pipx upgrade poetry

# Or
# create virtualenv, then (Recommand)
pip install poetry

# Or

pip install pipx
pipx install poetry
pipx upgrade poetry

(Version Control)

  1. gitbucket
scoop bucket add java
scoop install temurin11-jdk

set GITBUCKET_PORT=12122
set GITBUCKET_HOST=0.0.0.0
set GITBUCKET_HOME=<your_data_path> # The default is $HOME/gitbucket
java -jar gitbucket.war

https://github.com/gitbucket/gitbucket

  1. git
  2. SnowFS

  1. TortoiseSVN
# 重置当前仓库
svn revert --recursive .
# 忽略文件(项目级)
图形界面 TortoiseSVN -> Properties -> New -> Other -> svn:global-ignores
# 忽略文件(目录级)
选中一个文件/目录 -> TortoiseSVN -> Properties -> New -> Other -> svn:ignore
  1. VisualSVN Server
Info

SVN -> Import 可以将当前目录的所有文件上传项到SVNServer的版本库。
SVN -> Checkout 输入仓库地址与路径可以检出。

Error

1.SVN连接不到VisualSVN服务,检查是不是开启了代理。%appdata%\Subversion\servers 编辑这个文件,注释掉下方两行。

#http-proxy-host = 127.0.0.1
#http-proxy-port = 10809
2.SVN图标在Winodws11下不显示。原因是SVN的图标在注册表中靠后了。(Windows按照空格来排),(Explorer空白处右键 ) -> TortoiseSVN -> Settings -> Icon Overlays -> Overlay Handles -> Start registry Editor进行编辑,增加多几个空格使其排名靠前。

(Database Connection)

Mongosh - https://www.mongodb.com/try/download/compass
Mysqlsh - https://dev.mysql.com/downloads/shell/

for database install on Linux, see OS-Linux

(Cloud Services)

我们缺少的不是工具,而是真正产生价值的点子。

Vercel
Cloudflare
fly.io

(AI)

概念



模型

1702522306435

有哪些数据集

资料

谷歌研究论坛Google Research Blog
词嵌入数据可视化Embedding projector - visualization of high-dimensional data
LLM可视化 https://bbycroft.net/llm

李宏毅
吴恩达 Andrew NG

学习路径

  1. 10分鐘了解RNN的基本概念 [6AW80qmaAOk]
  2. Let's build GPT: from scratch, in code, spelled out. [kCc8FmEb1nY]
  3. Multitask Learning (C3W2L08) [UdXfsAr4Gjw]
  4. Transfer Learning (C3W2L07) [yofjFQddwHE]
  5. 扩散模型是如何工作的-系列 [oSmlciqXOaU]
  6. PyTorch深度学习框架-龙良曲

应用

1702620460693

(Graphics)

概念

(Robot)