- handler.py +5 -1
handler.py
CHANGED
|
@@ -22,6 +22,10 @@ from loguru import logger
|
|
| 22 |
|
| 23 |
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
if os.environ.get('IS_MY_DEBUG') is None:
|
| 26 |
result = subprocess.run(['pip', 'install', '-e', 'GroundingDINO'], check=True)
|
| 27 |
print(f'pip install GroundingDINO = {result}')
|
|
@@ -29,7 +33,7 @@ if os.environ.get('IS_MY_DEBUG') is None:
|
|
| 29 |
# result = subprocess.run(['pip', 'list'], check=True)
|
| 30 |
# print(f'pip list = {result}')
|
| 31 |
|
| 32 |
-
sys.path.insert(0, '
|
| 33 |
|
| 34 |
import argparse
|
| 35 |
import copy
|
|
|
|
| 22 |
|
| 23 |
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
| 24 |
|
| 25 |
+
os.chdir("/repository" if is_production else ".")
|
| 26 |
+
|
| 27 |
+
sys.path.insert(0, '/repository')
|
| 28 |
+
|
| 29 |
if os.environ.get('IS_MY_DEBUG') is None:
|
| 30 |
result = subprocess.run(['pip', 'install', '-e', 'GroundingDINO'], check=True)
|
| 31 |
print(f'pip install GroundingDINO = {result}')
|
|
|
|
| 33 |
# result = subprocess.run(['pip', 'list'], check=True)
|
| 34 |
# print(f'pip list = {result}')
|
| 35 |
|
| 36 |
+
sys.path.insert(0, '/repository/GroundingDINO')
|
| 37 |
|
| 38 |
import argparse
|
| 39 |
import copy
|