Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llm-server-test
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanjinfei
llm-server-test
Commits
ade4d256
Commit
ade4d256
authored
Mar 01, 2024
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload ps
parent
4f20c2a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
ompute-node-deploy.ps1
ompute-node-deploy.ps1
+65
-0
No files found.
ompute-node-deploy.ps1
0 → 100644
View file @
ade4d256
# 提示用户输入区块链用户地址
$userAddress
=
Read-Host
"请输入区块链用户地址(Please input ethereum account address):"
# 验证Bitcoin地址的基本格式
function
ValidateBitcoinAddress
{
param
(
[
string
]
$address
)
$regex
=
"^0x[0-9a-fA-F]{40}$"
if
(
$address
-match
$regex
)
{
return
$true
}
else
{
return
$false
}
}
# 检测用户输入的Bitcoin地址是否正确
if
(
-not
(
ValidateBitcoinAddress
-address
$userAddress
))
{
Write-Host
"输入的Ethereum地址无效,请检查格式."
Exit
1
}
Write-Host
"输入的Ethereum地址有效."
# 提示用户输入用户密码
$userPwd
=
Read-Host
"请输入用户密码:"
Write-Host
"输入的密码为:
$userPwd
"
#wsl --update
#wsl --install
#wsl --set-default Ubuntu
#wsl --set-default-version 2
#wsl curl -fsSL get.docker.com -o get-docker.sh
#echo $userPwd | wsl sudo -S sh get-docker.sh --mirror Aliyun
# 在这里可以继续执行其他操作
$linuxDistribution
=
"Ubuntu22.04"
$dockerSh
=
curl
https://get.docker.com
wsl
sh
$dockerSh
$key
=
curl
-s
-L
https://nvidia.github.io/nvidia-docker/gpgkey
echo
$userPwd
|
wsl
--
sudo
-S
apt-key
add
-
$key
$list
=
wsl
curl
-s
-L
https://nvidia.github.io/nvidia-docker/
$linuxDistribution
/nvidia-docker.list
echo
$userPwd
|
wsl
--
sudo
-S
tee
/etc/apt/sources.list.d/nvidia-docker.list
$list
echo
$userPwd
|
wsl
--
sudo
-S
apt-get
update
echo
$userPwd
|
wsl
--
sudo
-S
apt-get
install
-y
nvidia-docker2
echo
$userPwd
|
wsl
--
sudo
-S
systemctl
daemon-reload
echo
$userPwd
|
wsl
--
sudo
-S
systemctl
restart
docker
Write-Host
"安装nvida-docker依赖完成"
#wsl docker pull containrrr/watchtower
#wsl docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --cleanup --debug --interval 60
#Write-Host "启动watchtower自更新程序完成"
#wsl docker pull caduceus/computing-node
#wsl docker run -d -p 9090:9090 -e REWARD_ADDRESS=$userAddress caduceus/computing-node
#Write-Host "启动computing-node程序完成"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment