If your device has limited video memory and is unable to run the project smoothly, deploying it in the cloud may be a wise choice. Listed below are the key steps you need to consider.
1. Build a Tencent cloud server:
Open Tencent Cloud official website, search for "GPU Cloud Server", and select "Bidding xx" → "Asia Pacific" → "Tokyo" → "Tokyo District 2" → "Windows Mirror" → "2022 Data Service Center" → "Down step".
Create an installation group. If it does not exist, you can configure it yourself, set the server login password and submit it. After completing these steps, you will have a cloud server.
Log in to Tencent Cloud Server,
2. Install the driver for the server graphics card:
1. First open NVIDIA’s official driver download page [https://www.nvidia.cn/Download/index.aspx?lang=cn]. On this page, be sure to select the appropriate driver for your graphics card type. Taking the T4 graphics card as an example, you should select "Tesla" in the product type, "T-series" in the product series, and select "11.7" as the CUDA version. Once you've made these selections, just click on the Download button to get the driver for your graphics card.
Next step, install the graphics card driver,
3. Configure the python environment and Git environment on the server or your computer.
Python installation package download address:
<code>https://www.python.org/ftp/python/3.10.9/python-3.10.9-amd64.exe</code>
Git installation package download
<code>https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/Git-2.43.0-64-bit.exe</code>
First install python:
Next install Git:
4. Clone the InstantID source code to the server or your local computer,
<code>git clone https://github.com/aitrepreneur/INSTID</code>
5. Use the command "cd INSTID" in the current environment directory to enter the folder INSTID
6. Continue to enter the command "git lfs install" in the terminal
7. Enter the command to download the necessary model files from huggingface
<code>git clone https://huggingface.co/Aitrepreneur/models</code>
8. Please follow the following commands to install the required dependency packages for your project, including torch, xformers, torchvision, torchaudio, etc.
<code>pip3 install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu118</code>
9. Continue to install dependency packages for the project.
<code>pip install -r requirements.txt</code>
10. Use the following command to start running the project. This process will also download some model files,
<code>python app.py</code>
Once the link in the picture above appears, you can copy the link and paste it into your mobile phone or computer browser to open it, then you can run the project remotely.
The above is the detailed content of Xiaohongshu InstantID Tencent Cloud Server Deployment Tutorial. For more information, please follow other related articles on the PHP Chinese website!