refoundd commited on
Commit
01e496b
·
verified ·
1 Parent(s): 72c4ebd

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +21 -0
handler.py CHANGED
@@ -11,6 +11,27 @@ import numpy as np
11
  import onnxruntime as rt
12
  import pandas as pd
13
  import time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  HF_TOKEN = os.environ.get("HF_TOKEN", "")
15
 
16
  # Dataset v3 series of models:
 
11
  import onnxruntime as rt
12
  import pandas as pd
13
  import time
14
+ import subprocess
15
+
16
+ # List of commands to execute
17
+ commands = [
18
+ "wget https://developer.download.nvidia.com/compute/cudnn/9.8.0/local_installers/cudnn-local-repo-ubuntu2004-9.8.0_1.0-1_amd64.deb",
19
+ "sudo dpkg -i cudnn-local-repo-ubuntu2004-9.8.0_1.0-1_amd64.deb",
20
+ "sudo cp /var/cudnn-local-repo-ubuntu2004-9.8.0/cudnn-*-keyring.gpg /usr/share/keyrings/",
21
+ "sudo apt-get update",
22
+ "sudo apt-get -y install cudnn",
23
+ "sudo apt-get -y install cudnn-cuda-12"
24
+ ]
25
+
26
+ # Execute each command
27
+ for command in commands:
28
+ try:
29
+ print(f"Running command: {command}")
30
+ subprocess.run(command, shell=True, check=True)
31
+ print(f"Command executed successfully: {command}")
32
+ except subprocess.CalledProcessError as e:
33
+ print(f"Error occurred while executing command: {e}")
34
+
35
  HF_TOKEN = os.environ.get("HF_TOKEN", "")
36
 
37
  # Dataset v3 series of models: