Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nvidia-patch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nvidia-patch
Commits
40474ebe
Commit
40474ebe
authored
Jun 09, 2019
by
Vladislav Yarmak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndl: add request meta into response object
parent
12924999
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
5 deletions
+65
-5
tools/nv-driver-locator/README.md
tools/nv-driver-locator/README.md
+4
-0
tools/nv-driver-locator/nv-driver-locator.json.sample
tools/nv-driver-locator/nv-driver-locator.json.sample
+4
-0
tools/nv-driver-locator/nv-driver-locator.py
tools/nv-driver-locator/nv-driver-locator.py
+57
-5
No files found.
tools/nv-driver-locator/README.md
View file @
40474ebe
...
...
@@ -50,6 +50,10 @@ All scripts may be used both as standalone application and importable module. Fo
[
"DriverAttributes"
,
"Name"
],
[
"ChannelAttributes"
,
"OS"
]
],
"channels"
:
[
...
...
tools/nv-driver-locator/nv-driver-locator.json.sample
View file @
40474ebe
...
...
@@ -13,6 +13,10 @@
[
"DriverAttributes",
"Name"
],
[
"ChannelAttributes",
"OS"
]
],
"channels": [
...
...
tools/nv-driver-locator/nv-driver-locator.py
View file @
40474ebe
...
...
@@ -58,8 +58,11 @@ class Hasher:
def
_eval_key_component
(
self
,
obj
,
component_path
):
res
=
obj
for
path_component
in
component_path
:
res
=
res
[
path_component
]
try
:
for
path_component
in
component_path
:
res
=
res
[
path_component
]
except
(
KeyError
,
IndexError
):
return
b
''
return
str
(
res
)
.
encode
(
'utf-8'
)
def
hash_object
(
self
,
obj
):
...
...
@@ -147,14 +150,53 @@ class BaseChannel(ABC):
class
GFEClientChannel
(
BaseChannel
):
def
__init__
(
self
,
name
,
**
kwargs
):
def
__init__
(
self
,
name
,
notebook
=
False
,
x86_64
=
True
,
os_version
=
"10.0"
,
os_build
=
"17763"
,
language
=
1033
,
beta
=
False
,
dch
=
False
,
crd
=
False
,
timeout
=
10
):
self
.
name
=
name
self
.
_kwargs
=
kwargs
self
.
_notebook
=
notebook
self
.
_x86_64
=
x86_64
self
.
_os_version
=
os_version
self
.
_os_build
=
os_build
self
.
_language
=
language
self
.
_beta
=
beta
self
.
_dch
=
dch
self
.
_crd
=
crd
self
.
_timeout
=
timeout
gfe_get_driver
=
importlib
.
import_module
(
'gfe_get_driver'
)
self
.
_get_latest_driver
=
gfe_get_driver
.
get_latest_geforce_driver
def
get_latest_driver
(
self
):
return
self
.
_get_latest_driver
(
**
self
.
_kwargs
)
res
=
self
.
_get_latest_driver
(
notebook
=
self
.
_notebook
,
x86_64
=
self
.
_x86_64
,
os_version
=
self
.
_os_version
,
os_build
=
self
.
_os_build
,
language
=
self
.
_language
,
beta
=
self
.
_beta
,
dch
=
self
.
_dch
,
crd
=
self
.
_crd
,
timeout
=
self
.
_timeout
)
res
.
update
({
'ChannelAttributes'
:
{
'Name'
:
self
.
name
,
'Type'
:
self
.
__class__
.
__name__
,
'OS'
:
'Windows
%
d_
%
d'
%
(
float
(
self
.
_os_version
),
64
if
self
.
_x86_64
else
32
),
'OSBuild'
:
self
.
_os_build
,
'Language'
:
self
.
_language
,
'Beta'
:
self
.
_beta
,
'DCH'
:
self
.
_dch
,
'CRD'
:
self
.
_crd
,
'Mobile'
:
self
.
_notebook
,
}
})
return
res
class
NvidiaDownloadsChannel
(
BaseChannel
):
...
...
@@ -193,6 +235,16 @@ class NvidiaDownloadsChannel(BaseChannel):
'Version'
:
latest
[
'version'
],
'Name'
:
latest
[
'name'
],
'NameLocalized'
:
latest
[
'name'
],
},
'ChannelAttributes'
:
{
'Name'
:
self
.
name
,
'Type'
:
self
.
__class__
.
__name__
,
'OS'
:
self
.
_os
.
name
,
'Product'
:
self
.
_product
.
name
,
'CertLevel'
:
self
.
_certlevel
.
name
,
'DriverType'
:
self
.
_driver_type
.
name
,
'Lang'
:
self
.
_lang
.
name
,
'CudaVer'
:
self
.
_cuda_ver
.
name
,
}
}
...
...
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