惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
雷峰网
雷峰网
罗磊的独立博客
T
The Blog of Author Tim Ferriss
阮一峰的网络日志
阮一峰的网络日志
量子位
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
Cisco Talos Blog
Cisco Talos Blog
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
A
About on SuperTechFans
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Cloudflare Blog
Know Your Adversary
Know Your Adversary
T
Threat Research - Cisco Blogs
Spread Privacy
Spread Privacy
D
DataBreaches.Net
T
The Exploit Database - CXSecurity.com
K
Kaspersky official blog
Cyberwarzone
Cyberwarzone
爱范儿
爱范儿
U
Unit 42
Security Latest
Security Latest
M
MIT News - Artificial intelligence
月光博客
月光博客
Scott Helme
Scott Helme
G
Google Developers Blog
有赞技术团队
有赞技术团队
T
Tor Project blog
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
博客园 - Franky
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
V
V2EX
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
S
Securelist
博客园 - 三生石上(FineUI控件)
Blog — PlanetScale
Blog — PlanetScale
TaoSecurity Blog
TaoSecurity Blog
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
腾讯CDC
D
Docker
Google Online Security Blog
Google Online Security Blog

FrWalker Blog

代码开发与环境管理工具汇总 求职-LeetCode热题100刷题记录 通用印刷电路板全自动布线算法 基于元器件手册的智能建库算法 博客语法记录 柔性电路板FPC自动布线 拓竹P1S初体验 cdn加速hexo博客_2次开发hexo-cdn-jsdelivr 不更换插件解决Hexo博客Latex公式的渲染问题 修改博客加密插件hexo-blog-encrypt 3.1.9,适配移动端 强化学习-1-多臂老虎机 强化学习-2-马尔可夫决策过程 强化学习-3-动态规划 强化学习-4-时序差分 强化学习-5-Dyna-Q算法 强化学习-6-DQN算法 2024华为软件精英挑战赛-智慧港口 3.liunx shell及其脚本理解 2.linux文件系统及用户管理
新机迁移-hexo\vscode\便携git\miniconda\i卡环境配置
FrWalker · 2025-04-15 · via FrWalker Blog
hexo环境配置hexovscodegitminicondaintel GPU

新机迁移-hexo\vscode\便携git\miniconda\i卡环境配置

hexo配置过程

1.安装nvm

官网下载安装包即可,我的版本是1.1.11

2.安装node

我的版本是v22.13.0,使用命令nvm install v22.13.0

3.解决npm报错

输入nvm use npm install -g hexo-cli切换到node-v22.13.0版本,再输入npm -v会出现:

1
2
3
4
5
npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ npm -v
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

因为在此系统上禁止运行脚本,也就是说没有权限,输入命令get-ExecutionPolicy得到:

1
Restricted

受限制的,表示状态是禁止的,添加权限,输入命令Set-ExecutionPolicy -Scope CurrentUser,再输入参数RemoteSigned得到:

1
2
3
位于命令管道位置 1 的 cmdlet Set-ExecutionPolicy
请为以下参数提供值:
ExecutionPolicy: RemoteSigned

验证,输入get-ExecutionPolicynpm -v得到RemoteSigned和10.9.2:

4.安装hexo

输入npm install -g hexo-cli

5.验证

输入hexo s,博客正常生成和显示

附git便携版配置过程

1.将PortableGit/cmd放入环境变量Path

2.配置全局变量

1
2
git config –global user.name “FrwalkerCn”
git config –global user.email “frwalker.cn@gmail.com”

2.运行git bash输入ssh-keygen -t rsa -C frwalker.cn@gmail.com生成公钥和私钥

3.将公钥配置在github账号的SSH and GPG keys里

4.在/c/Users/luowei/.ssh/config加入:

1
2
3
4
5
Host github.com
HostName ssh.github.com
Port 443
User git
IdentityFile C:/Users/luowei/.ssh/id_rsa

5.测试git是否正常使用,输入 ssh -T git@github.com得到:Hi FrWalkerCn! You’ve successfully authenticated, but GitHub does not provide shell access.

将git配置进vscode

在vscode的setting.json添加Git Bash路径:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash",
"path":"d:/FreeInstallSoftware/PortableGit/bin/bash.exe",
}
},

注意,只有bin/bash.exe是控制台应用程序,可以重定向stdin/stdout/stderr,可用作集成shell;git-bash.exe则是windows应用程序会弹窗而无法集成,以WinMain作为条目。

miniconda

下载地址:https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe

注意安装时不要勾选add path,安装完成后手动将C:\Users\luowei\miniconda3\Scripts加入环境变量,在任意shell里conda init后即可正常使用。

使用方式同conda,见windows10 深度学习环境配置torch、cuda,这里仅记录i卡和n卡的配置区别,因为新电脑是i卡。

i卡配置

1.安装驱动

官网搜索后安装即可,我的是英特尔显卡a770,对应驱动网址:https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html
安装前最好使用DDU软件在安全模式下卸载干净之前的驱动

2.配置torch环境

1
2
conda create -n A770Pytorch python pip
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu

(如果想要删除,使用conda remove A770Pytorch --all)

3.验证

conda activate A770Pytorch激活环境在python控制台验证可以得到:

1
2
3
4
(A770Pytorch) PS C:\Users\luowei> python
>>> import torch
>>> torch.xpu.is_available()
True

使用https://gitee.com/Pauntech/Pytorch-2.5的示例进行训练:

1
2
3
4
5
6
7
8
9
10
11
(A770Pytorch) PS C:\Users\luowei\Desktop\Pytorch-2.5-master> python .\train_on_arc.py
100.0%
Initiating training
C:\Users\luowei\Desktop\Pytorch-2.5-master\train_on_arc.py:41: UserWarning: Converting a tensor with requires_grad=True to a scalar may lead to unexpected behavior.
Consider using tensor.detach() first. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\pytorch\aten\src\ATen\native\Scalar.cpp:23.)
iteration_loss = loss.item()
Iteration [10/3125], Loss: 3.6445
Iteration [20/3125], Loss: 2.6565
Iteration [30/3125], Loss: 2.6902
Iteration [40/3125], Loss: 2.3816
Iteration [50/3125], Loss: 2.5507

验证成功