在这个框架中,每个组件都有其特定的角色和功能,它们通过Web UI这个桥梁相互连接,共同为用户提供服务。用户通过浏览器与Web服务器交互,而Web服务器则负责与后端的HivisionIDPhotos模型进行通信,以完成图片生成的任务。
• 操作系统选择:
进行如下设置:
新建完后双击或者右键点击连接
vi /etc/apt/sources.list# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiversesudo apt-get updatesudo apt upgradeubuntu-drivers devicessudo apt update
sudo apt install nvidia-driver-535rebootnvidia-smi
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda-repo-ubuntu2204-12-3-local_12.3.0-545.23.06-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-3-local_12.3.0-545.23.06-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-3-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-3export PATH=/usr/local/cuda-12.3/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}source ~/.bashrcnvcc -Vwget https://mirrors.cqupt.edu.cn/anaconda/miniconda/Miniconda3-py310_23.10.0-1-Linux-x86_64.shbash Miniconda3-py310_23.10.0-1-Linux-x86_64.sh -u
直接一直enter键,到输入路径和yes
直接回车enter即可,再次输入yes
成功安装 
vim ~/.bashrc export PATH="/root/miniconda3/bin:$PATH"
按esc键退出编辑模式,输入:wq保存并退出 source ~/.bashrc
conda init bash
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
pip config set globalThis.index-url https://pypi.tuna.tsinghua.edu.cn/simple
conda create -n HP python=3.9
conda activate HPgit clone https://github.com/Zeyi-Lin/HivisionIDPhotos.gitgit clone https://mirror.ghproxy.com/https://github.com/Zeyi-Lin/HivisionIDPhotos.gitcd HivisionIDPhotospip install -r requirements.txt
pip install -r requirements-app.txtpython scripts/download_model.py --models allpython app.py --host 0.0.0.0 --port 15120