This commit is contained in:
Timothy J. Baek
2024-09-10 01:37:36 +01:00
parent eb0e683b47
commit 28087ccf40
4 changed files with 12 additions and 47 deletions

View File

@@ -32,6 +32,15 @@ except ImportError:
print("dotenv not installed, skipping...")
# device type embedding models - "cpu" (default), "cuda" (nvidia gpu required) or "mps" (apple silicon) - choosing this right can lead to better performance
USE_CUDA = os.environ.get("USE_CUDA_DOCKER", "false")
if USE_CUDA.lower() == "true":
DEVICE_TYPE = "cuda"
else:
DEVICE_TYPE = "cpu"
####################################
# LOGGING
####################################