Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
gpu-base-image-build
Commits
1e0f9743
Commit
1e0f9743
authored
Sep 18, 2024
by
chenpangpang
Browse files
feat: 输出os信息
parent
9fea35de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
script/1_base_test.sh
script/1_base_test.sh
+12
-10
No files found.
script/1_base_test.sh
View file @
1e0f9743
#!/bin/bash
#!/bin/bash
docker run
--rm
--platform
=
linux/amd64
--gpus
all
$1
cat
/etc/issue
&&
python
-c
\
docker run
--rm
--platform
=
linux/amd64
--gpus
all
$1
python
-c
\
'import sys; \
"import os;
\
print("python version: ", sys.version); \
os.system(
\"
cat /etc/issue
\"
);
\
import sys;
\
print(
\"
python version:
\"
, sys.version);
\
import torch;
\
import torch;
\
print("torch version: ", torch.__version__); \
print(
\
"
torch version:
\
"
, torch.__version__);
\
print("torch cuda available: ", torch.cuda.is_available()); \
print(
\
"
torch cuda available:
\
"
, torch.cuda.is_available());
\
print("torch cuda version: ", torch.version.cuda); \
print(
\
"
torch cuda version:
\
"
, torch.version.cuda);
\
print("torch cudnn version: ",torch.backends.cudnn.version()); \
print(
\
"
torch cudnn version:
\
"
,torch.backends.cudnn.version());
\
import torchvision;
\
import torchvision;
\
print("torchvision version: ", torchvision.__version__); \
print(
\
"
torchvision version:
\
"
, torchvision.__version__);
\
import torchaudio;
\
import torchaudio;
\
print("torchaudio version: ", torchaudio.__version__);
print(
\"
torchaudio version:
\"
, torchaudio.__version__);
'
"
\ No newline at end of file
\ No newline at end of file
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