基础环境:wsl2安装Ubuntu22.04 + miniconda

news2024/11/15 5:43:20

服务器相关信息:

Thinkpad p1 gen5 64G 2T 3080ti,自带的有nvidia-smi显卡驱动。

使用wsl2安装Ubuntu22.04 + miniconda

目标:安装gpu版本的PyTorch2.1.2(torch2.1.2/cu117 + torchvision0.16.2/cu117)
处理器	12th Gen Intel(R) Core(TM) i9-12900H   2.50 GHz
机带 RAM	64.0 GB (63.7 GB 可用)
系统类型	64 位操作系统, 基于 x64 的处理器
显卡: 3080TI
版本	Windows 11 专业版
版本	23H2
安装日期	‎2024/‎4/‎15
操作系统版本	22631.3447
体验	Windows Feature Experience Pack 1000.22688.1000.0

$ nvidia-smi
Fri Apr 19 09:15:30 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.76.01              Driver Version: 552.22         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3080 ...    On  |   00000000:01:00.0 Off |                  N/A |
| N/A   47C    P0             26W /   95W |       0MiB /  16384MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

cuda环境搭建

1、CUDA Toolkit 11.7 Update 1 Downloads
下载地址:https://developer.nvidia.com/cuda-11-7-1-download-archive

在这里插入图片描述

$ wget https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
--2024-04-19 09:19:29--  https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 152.199.39.144
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|152.199.39.144|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://developer.download.nvidia.cn/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run [following]
--2024-04-19 09:19:29--  https://developer.download.nvidia.cn/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
Resolving developer.download.nvidia.cn (developer.download.nvidia.cn)... 36.153.62.131, 36.153.62.132, 36.153.62.130, ...
Connecting to developer.download.nvidia.cn (developer.download.nvidia.cn)|36.153.62.131|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3524358811 (3.3G) [application/octet-stream]
Saving to: ‘cuda_11.7.1_515.65.01_linux.run’

cuda_11.7.1_515.65.01_linux.run         100%[=============================================================================>]   3.28G  28.4MB/s    in 92s

2024-04-19 09:21:03 (36.6 MB/s) - ‘cuda_11.7.1_515.65.01_linux.run’ saved [3524358811/3524358811]

安装依赖库文件
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
sudo apt-get -y install  libfreeimage3 libfreeimage-dev


~$gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~$ ls
cuda_11.7.1_515.65.01_linux.run
~$ sudo sh cuda_11.7.1_515.65.01_linux.run
===========
= Summary =
===========

Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-11.7/

Please make sure that
 -   PATH includes /usr/local/cuda-11.7/bin
 -   LD_LIBRARY_PATH includes /usr/local/cuda-11.7/lib64, or, add /usr/local/cuda-11.7/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.7/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 515.00 is required for CUDA 11.7 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
    sudo <CudaInstaller>.run --silent --driver

Logfile is /var/log/cuda-installer.log

最后的summary最重要的是这两句:

Please make sure that
 -   PATH includes /usr/local/cuda-11.7/bin
 -   LD_LIBRARY_PATH includes /usr/local/cuda-11.7/lib64, or, add /usr/local/cuda-11.7/lib64 to /etc/ld.so.conf and run ldconfig as root

在路径中添加/usr/local/cuda-10.7/bin和/usr/local/cuda-10.7/lib64
在 vim ~/.bashrc末尾添加:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin
export CUDA_HOME=$CUDA_HOME:/usr/local/cuda

 source ~/.bashrc
 nvcc -V

安装cudnn

方法一:
sudo dpkg -i cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2004-8.9.7.29/cudnn-local-30472A84-keyring.gpg /usr/share/keyrings/
cd /var/cudnn-local-repo-ubuntu2204-8.9.7.29
sudo dpkg -i libcudnn8_8.9.7.29-1+cuda11.8_amd64.deb
sudo dpkg -i libcudnn8-dev_8.9.7.29-1+cuda11.8_amd64.deb
sudo dpkg -i libcudnn8-samples_8.9.7.29-1+cuda11.8_amd64.deb

 
cp -r /usr/src/cudnn_samples_v8/ $HOME
cd  $HOME/cudnn_samples_v8/mnistCUDNN
make clean && make
./mnistCUDNN
 
方法二(建议使用):
tar -xzf cudnn-linux-x86_64-8.9.7.29_cuda11-archive.tar.xz
cp cudnn-linux-x86_64-8.9.7.29_cuda11-archive/include/cudnn.h /usr/local/cuda/include
cp cudnn-linux-x86_64-8.9.7.29_cuda11-archive/lib64/libcudnn* /usr/local/cuda/lib64
chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

安装nccl

NCCL下载地址:NVIDIA Collective Communications Library (NCCL) | NVIDIA Developer

下载地址:
https://developer.nvidia.com/nccl/nccl-legacy-downloads

  sudo dpkg -i  nccl-local-repo-ubuntu2204-2.14.3-cuda11.7_1.0-1_amd64.deb
  sudo cp /var/nccl-local-repo-ubuntu2204-2.14.3-cuda11.7/nccl-local-F0C3C384-keyring.gpg     /usr/share/keyrings/
  sudo apt install libnccl2 libnccl-dev
  sudo apt update

官方教程地址:https://docs.nvidia.com/deeplearning/nccl/install-guide/#down
3.1. Ubuntu
Installing NCCL on Ubuntu requires you to first add a repository to the APT system containing the NCCL packages, then installing the NCCL packages through APT. There are two repositories available; a local repository and a network repository. Choosing the latter is recommended to easily retrieve upgrades when newer versions are posted.
In the following commands, please replace with your CPU architecture: x86_64, ppc64le, or sbsa, and replace with the Ubuntu version, for example ubuntu1604, ubuntu1804, or ubuntu2004.
Install the repository.
For a local NCCL repository:
sudo dpkg -i nccl-repo-.deb
Note:
The local repository installation will prompt you to install the local key it embeds and with which packages are signed. Make sure to follow the instructions to install the local key, or the install phase will fail later.

For the network repository:
wget https://developer.download.nvidia.com/compute/cuda/repos///cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
Update the APT database:
sudo apt update
Install the libnccl2 package with APT. Additionally, if you need to compile applications with NCCL, you can install the libnccl-dev package as well:
Note: If you are using the network repository, the following command will upgrade CUDA to the latest version.
sudo apt install libnccl2 libnccl-dev
If you prefer to keep an older version of CUDA, specify a specific version, for example:
sudo apt install libnccl2=2.4.8-1+cuda10.0 libnccl-dev=2.4.8-1+cuda10.0
Refer to the download page for exact package versions.




## 安装miniconda

chop@zhangjiapeng:~$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_23.11.0-1-Linux-x86_64.sh
–2024-04-19 16:41:15-- https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_23.11.0-1-Linux-x86_64.sh
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)… 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 131882602 (126M) [application/octet-stream]
Saving to: ‘Miniconda3-py38_23.11.0-1-Linux-x86_64.sh’

Miniconda3-py38_23.11.0-1-Linux-x86_64. 100%[=============================================================================>] 125.77M 378KB/s in 5m 28s

2024-04-19 16:46:43 (393 KB/s) - ‘Miniconda3-py38_23.11.0-1-Linux-x86_64.sh’ saved [131882602/131882602]

chop@zhangjiapeng:~$ bash Miniconda3-py38_23.11.0-1-Linux-x86_64.sh

Welcome to Miniconda3 py38_23.11.0-1

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue

======================================
End User License Agreement - Miniconda

Copyright 2015-2023, Anaconda, Inc.

All rights reserved under the 3-clause BSD License:

This End User License Agreement (the “Agreement”) is a legal agreement between you and Anaconda, Inc. (“Anaconda”) and governs your use of Miniconda.

Subject to the terms of this Agreement, Anaconda hereby grants you a non-exclusive, non-transferable license to:

  • Install and use the Miniconda,
  • Modify and create derivative works of sample source code delivered in Miniconda subject to the Terms of Service for the Repository (as defined hereinafter
    ) available at https://www.anaconda.com/terms-of-service, and
  • Redistribute code files in source (if provided to you by Anaconda as source) and binary forms, with or without modification subject to the requirements se
    t forth below.

Anaconda may, at its option, make available patches, workarounds or other updates to Miniconda. Unless the updates are provided with their separate governing
terms, they are deemed part of Miniconda licensed to you as provided in this Agreement. This Agreement does not entitle you to any support for Miniconda.

Anaconda reserves all rights not expressly granted to you in this Agreement.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
    other materials provided with the distribution.
  • Neither the name of Anaconda nor the names of its contributors may be used to endorse or promote products derived from this software without specific prio
    r written permission.

You acknowledge that, as between you and Anaconda, Anaconda owns all right, title, and interest, including all intellectual property rights, in and to Minicon
da and, with respect to third-party products distributed with or through Miniconda, the applicable third-party licensors own all right, title and interest, in
cluding all intellectual property rights, in and to such products. If you send or transmit any communications or materials to Anaconda suggesting or recommend
ing changes to the software or documentation, including without limitation, new features or functionality relating thereto, or any comments, questions, sugges
tions or the like (“Feedback”), Anaconda is free to use such Feedback. You hereby assign to Anaconda all right, title, and interest in, and Anaconda is free t
o use, without any attribution or compensation to any party, any ideas, know-how, concepts, techniques or other intellectual property rights contained in the
Feedback, for any purpose whatsoever, although Anaconda is not required to use any Feedback.

DISCLAIMER

THIS SOFTWARE IS PROVIDED BY ANACONDA AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE
S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS IN
TERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY W
AY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

TO THE MAXIMUM EXTENT PERMITTED BY LAW, ANACONDA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY
LOST PROFITS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEME
NT OR THE USE OR PERFORMANCE OF MINICONDA, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEG
LIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY. IN NO EVENT WILL THE TOTAL CUMULATIVE LIABILITY OF ANACONDA AND ITS AFFILIATE
S UNDER OR ARISING OUT OF THIS AGREEMENT EXCEED 10.00 U.S. DOLLARS.

Miscellaneous

If you want to terminate this Agreement, you may do so by discontinuing use of Miniconda. Anaconda may, at any time, terminate this Agreement and the license
granted hereunder if you fail to comply with any term of this Agreement. Upon any termination of this Agreement, you agree to promptly discontinue use of the
Miniconda and destroy all copies in your possession or control. Upon any termination of this Agreement all provisions survive except for the licenses granted
to you.

This Agreement is governed by and construed in accordance with the internal laws of the State of Texas without giving effect to any choice or conflict of law
provision or rule that would require or permit the application of the laws of any jurisdiction other than those of the State of Texas. Any legal suit, action,
or proceeding arising out of or related to this Agreement or the licenses granted hereunder by you must be instituted exclusively in the federal courts of th
e United States or the courts of the State of Texas in each case located in Travis County, Texas, and you irrevocably submit to the jurisdiction of such court
s in any such suit, action, or proceeding.

Notice of Third Party Software Licenses

Miniconda provides access to a repository (the “Repository”) which contains software packages or tools licensed on an open source basis from third parties and
binary packages of these third party tools. These third party software packages or tools are provided on an “as is” basis and are subject to their respective
license agreements as well as this Agreement and the Terms of Service for the Repository located at https://www.anaconda.com/terms-of-service; provided, howe
ver, no restriction contained in the Terms of Service shall be construed so as to limit Your ability to download the packages contained in Miniconda provided
you comply with the license for each such package. These licenses may be accessed from within the Miniconda software[1] or https://www.anaconda.com/legal. Inf
ormation regarding which license is applicable is available from within many of the third party software packages and tools and at https://repo.anaconda.com/p
kgs/main/ and https://repo.anaconda.com/pkgs/r/. Anaconda reserves the right, in its sole discretion, to change which third party tools are included in the Re
pository accessible through Miniconda.

Intel Math Kernel Library

Miniconda provides access to re-distributable, run-time, shared-library files from the Intel Math Kernel Library (“MKL binaries”).

Copyright 2018 Intel Corporation. License available at https://software.intel.com/en-us/license/intel-simplified-software-license (the “MKL License”).

You may use and redistribute the MKL binaries, without modification, provided the following conditions are met:

  • Redistributions must reproduce the above copyright notice and the following terms of use in the MKL binaries and in the documentation and/or other materia
    ls provided with the distribution.
  • Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from the MKL binaries without specific prior w
    ritten permission.
  • No reverse engineering, decompilation, or disassembly of the MKL binaries is permitted.

You are specifically authorized to use and redistribute the MKL binaries with your installation of Miniconda subject to the terms set forth in the MKL License
. You are also authorized to redistribute the MKL binaries with Miniconda or in the Anaconda package that contains the MKL binaries. If needed, instructions f
or removing the MKL binaries after installation of Miniconda are available at https://docs.anaconda.com.

cuDNN Software

Miniconda also provides access to cuDNN software binaries (“cuDNN binaries”) from NVIDIA Corporation. You are specifically authorized to use the cuDNN binarie
s with your installation of Miniconda subject to your compliance with the license agreement located at https://docs.nvidia.com/deeplearning/sdk/cudnn-sla/inde
x.html. You are also authorized to redistribute the cuDNN binaries with an Miniconda package that contains the cuDNN binaries. You can add or remove the cuDNN
binaries utilizing the install and uninstall features in Miniconda.

cuDNN binaries contain source code provided by NVIDIA Corporation.

Arm Performance Libraries

Arm Performance Libraries (Free Version): Anaconda provides access to software and related documentation from the Arm Performance Libraries (“Arm PL”) provide
d by Arm Limited. By installing or otherwise accessing the Arm PL, you acknowledge and agree that use and distribution of the Arm PL is subject to your compli
ance with the Arm PL end user license agreement located at: https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries/eu
la.

Export; Cryptography Notice

You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end us
ers, and end use. Miniconda includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, a
nd/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country’s laws, regulations and policies c
oncerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement http://www.wassenaa
r.org/ for more information.

Anaconda has self-classified this software as Export Commodity Control Number (ECCN) EAR99, which includes mass market information security software using or
performing cryptographic functions with asymmetric algorithms. No license is required for export of this software to non-embargoed countries.

The Intel Math Kernel Library contained in Miniconda is classified by Intel as ECCN 5D992.c with no license required for export to non-embargoed countries.

The following packages listed on https://www.anaconda.com/cryptography are included in the Repository accessible through Miniconda that relate to cryptography
.

Last updated March 21, 2022

Do you accept the license terms? [yes|no]

yes

Miniconda3 will now be installed into this location:
/home/chop/miniconda3

  • Press ENTER to confirm the location
  • Press CTRL-C to abort the installation
  • Or specify a different location below

[/home/chop/miniconda3] >>>
PREFIX=/home/chop/miniconda3
Unpacking payload …

Installing base environment…

Downloading and Extracting Packages:

Downloading and Extracting Packages:

Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you’d prefer that conda’s base environment not be activated on startup,
run the following command when conda is activated:

conda config --set auto_activate_base false

You can undo this by running conda init --reverse $SHELL? [yes|no]
[no] >>> yes
no change /home/chop/miniconda3/condabin/conda
no change /home/chop/miniconda3/bin/conda
no change /home/chop/miniconda3/bin/conda-env
no change /home/chop/miniconda3/bin/activate
no change /home/chop/miniconda3/bin/deactivate
no change /home/chop/miniconda3/etc/profile.d/conda.sh
no change /home/chop/miniconda3/etc/fish/conf.d/conda.fish
no change /home/chop/miniconda3/shell/condabin/Conda.psm1
no change /home/chop/miniconda3/shell/condabin/conda-hook.ps1
no change /home/chop/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /home/chop/miniconda3/etc/profile.d/conda.csh
modified /home/chop/.bashrc

> For changes to take effect, close and re-open your current shell. <

Thank you for installing Miniconda3!




  /home/chop/miniconda3/shell/condabin/Conda.psm1
no change     /home/chop/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/chop/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /home/chop/miniconda3/etc/profile.d/conda.csh
modified      /home/chop/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

Thank you for installing Miniconda3!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1622292.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ADS8866 ADC转换芯片驱动调试

目录 ADS8866 ADC转换芯片驱动调试 开发环境&#xff1a; ADS8866功能简介 硬件连接 SPI3的软件驱动 ADS8866通讯时序分析 ADS8866驱动 ADS8866 ADC转换芯片驱动调试 开发环境&#xff1a; 主控芯片&#xff1a;STM32F103RCT6、ADS8866转换芯片、使用HAL库进行开发。 …

Chitosan-Rhodamine B 罗丹明B标记壳聚糖

Chitosan-Rhodamine B 罗丹明B标记壳聚糖 【中文名称】罗丹明B标记壳聚糖 【英文名称】Chitosan-RB 【结 构】 【品 牌】碳水科技&#xff08;Tanshtech&#xff09; 【纯 度】95%以上 【保 存】-20℃ 【规 格】50mg,100mg,500mg,1g,5g,10g 【产品特性】 Rh…

libVLC 专栏介绍

本专栏主要界面libVLC的使用&#xff0c;详细介绍了相关用法&#xff0c;使用Qt作为显示界面&#xff0c;不仅可以了解Qt的使用&#xff0c;QSS的美化&#xff0c;更能够熟悉libVLC核心接口的使用&#xff0c;最后打造一款属于自己的精美播放器。 每一节都有单独的源码供查看。…

企业微信hook接口协议,ipad协议http,发送小程序

发送小程序 参数名必选类型说明uuid是String每个实例的唯一标识&#xff0c;根据uuid操作具体企业微信send_userid是long要发送的人或群idisRoom是bool是否是群消息 请求示例 {"uuid":"543ed7f3-6ec1-4db8339a140f7","send_userid":788130255…

gps路径压缩算法

公司的gps点位特别多,导致数据存储以及查询都会造成一定的压力. 所以我们需要使用gps路径压缩算法 我调研了两种: k-means 和 Douglas-Peucker k-means 压缩的底层原理是: 自定义簇的数量,假设是100个,那么就会计算所有gps点,把最相近的点,放在一个簇里,以此类推,计算出100个…

你如何看待AIGC技术?

你如何看待AIGC技术&#xff1f; AIGC技术&#xff08;Artificial Intelligence Generated Content&#xff09;是指由人工智能生成的内容。它在许多领域都有应用&#xff0c;包括自然语言处理、图像生成、音频合成等。虽然这些技术可以提高效率和创造力&#xff0c;但也需要注…

机器学习和深度学习-- 李宏毅(笔记与个人理解)Day22

Day 22 Transformer seqence to seqence 有什么用呢&#xff1f; Encoder how Block work 仔细讲讲Residual 的过程&#xff1f; 重构 Decoder - AutoRegressive Mask 由于是文字接龙&#xff0c;所以无法考虑右边的 info 另一种decoder Encoder to Decoder – Cross Attend…

【算法】五子连线

题目描述 五子棋是世界智力运动会竞技项目之一&#xff0c;是一种两人对弈的纯策略型棋类游戏&#xff0c;通常双方分别使用黑白两色的棋子&#xff0c;下在棋盘直线与横线的交叉点上&#xff0c;先形成连续的五子连线&#xff08;横、竖、斜&#xff09;者获胜。 棋盘一般为…

电脑回收站的东西还原后会在哪里?一文给你答案!

“很奇怪&#xff0c;想问问大家&#xff0c;我电脑回收站里还原的文件会被保存在哪里呀&#xff1f;刚刚恢复文件的时候本来想直接将它拖出&#xff0c;却发现文件不见了&#xff0c;这种情况应该怎么解决呢&#xff1f;” 电脑回收站是一个特殊的文件夹&#xff0c;用于临时存…

解决IDEA中Tomcat控制台乱码问题(包括sout输出乱码)

文章目录 前言一、控制台直接输出乱码二、sout输出内容在控制台显示乱码 前言 今天在使用Tomcat的时候发现控制台输入出现了乱码问题&#xff0c;其实之前就出现过一次&#xff0c;解决了&#xff0c;但是新创建一个项目后又会出现sout的内容在控制台输出的乱码问题&#xff0…

【漏洞复现】云时空社会化商业ERP系统LoginName SQL注入漏洞

漏洞描述&#xff1a; 云时空社会化商业ERP系统loginName存在SQL注入漏洞&#xff0c;攻击者可以通过此漏洞获取数据库敏感信息。 搜索语法: Fofa-Query: app"云时空社会化商业ERP系统" 漏洞详情&#xff1a; 1.云时空社会化商业ERP系统。 2.漏洞POC&#xff1a…

redis中的双写一致性问题

双写一致性问题 1.先删除缓存或者先修改数据库都可能出现脏数据。 2.删除两次缓存&#xff0c;可以在一定程度上降低脏数据的出现。 3.延时是因为数据库一般采用主从分离&#xff0c;读写分离。延迟一会是让主节点把数据同步到从节点。 1.读写锁保证数据的强一致性 因为一般放…

svg图标填充渐变色及CSS鼠标悬停纯色渐变色转换

svg图标填充渐变色及CSS鼠标悬停纯色渐变色转换&#xff1a; HTML&#xff1a; <!--底部导航--> <ul class"milliaNav"> <li class"active"><a href"#"> <svg class"icon" viewBox"0 0 1024 1024&qu…

06.JAVAEE之线程4

1.定时器 1.1 定时器是什么 定时器也是软件开发中的一个重要组件. 类似于一个 " 闹钟 ". 达到一个设定的时间之后 , 就执行某个指定好的代码. 约定一个时间,时间到达之后,执行某个代码逻辑, 定时器非常常见,尤其是在进行网络通信的时候, 需要有等待的最大时间&…

xilinx Mailbox 中的ipi message地址计算方式

适用于openAmp mailbox ipi id对应的ipi message地址计算方式 官方openamp硬件配置解析 OpenAMP Base Hardware Configurations - Xilinx Wiki - Confluence openamp官方设备树 meta-openamp/meta-xilinx-tools/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi at rel-v2…

政安晨:【Keras机器学习示例演绎】(十四)—— 用于弱光图像增强的零 DCE

目录 简介 下载 LOL 数据集 创建 TensorFlow 数据集 零 DCE 框架 了解光线增强曲线 DCE-Net 损失函数 色彩恒定损失 曝光损失 光照平滑度损失 空间一致性损失 深度曲线估计模型 训练 推论 测试图像推理 政安晨的个人主页&#xff1a;政安晨 欢迎 &#x1f44d;点…

遥感卫星影像地表温度反演

近年来&#xff0c;随着遥感技术的不断发展和卫星遥感数据的广泛应用&#xff0c;遥感卫星地表温度反演成为了地球科学和环境监测领域的重要研究内容。地表温度反演是指利用遥感卫星数据推算地表温度的过程&#xff0c;其原理基于地物表面的辐射特征与温度之间的关系。本文将介…

Github2024-04-25 开源项目日报Top10

根据Github Trendings的统计,今日(2024-04-25统计)共有10个项目上榜。根据开发语言中项目的数量,汇总情况如下: 开发语言项目数量Python项目4非开发语言项目2TypeScript项目2PowerShell项目1C++项目1Dart项目1JavaScript项目1GPT4All: 在边缘运行开源大型语言模型 创建周期:…

C++:拷贝构造函数的初始化列表

拷贝构造函数的初始化列表是在拷贝构造函数的定义中出现的一组初始值&#xff0c;用于初始化新创建的对象的成员变量。它的语法是在构造函数的声明后面使用冒号&#xff08;:&#xff09;来开头&#xff0c;然后列出要初始化的成员变量和它们的初始值。初始化列表的优点在于它允…

从国内盲盒小程序看国外市场的发展机遇与挑战

近年来&#xff0c;盲盒小程序在国内市场迅速崛起&#xff0c;凭借其独特的营销模式和消费者体验&#xff0c;赢得了大量年轻消费者的喜爱。从国内盲盒小程序的发展中&#xff0c;我们可以窥见国外市场的一些发展机遇与挑战&#xff0c;为进军国际市场提供有益的参考。 首先&a…