Spaces:
Running
Running
MVPilgrim
commited on
Commit
·
f3dd597
1
Parent(s):
d477c68
debug
Browse files- Dockerfile +2 -0
- app.py +7 -0
Dockerfile
CHANGED
@@ -3,6 +3,8 @@ FROM nvidia/cuda:12.6.0-base-ubuntu22.04 AS base
|
|
3 |
|
4 |
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
ENV DEBCONF_NOWARNINGS="yes"
|
|
|
|
|
6 |
|
7 |
# Install necessary dependencies and musl
|
8 |
RUN apt-get update && apt-get install -y \
|
|
|
3 |
|
4 |
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
ENV DEBCONF_NOWARNINGS="yes"
|
6 |
+
ENV CUDA_VISIBLE_DEVICES=0
|
7 |
+
ENV LLAMA_CUBLAS=1
|
8 |
|
9 |
# Install necessary dependencies and musl
|
10 |
RUN apt-get update && apt-get install -y \
|
app.py
CHANGED
@@ -22,6 +22,8 @@ import time
|
|
22 |
import pprint
|
23 |
import io
|
24 |
|
|
|
|
|
25 |
|
26 |
|
27 |
try:
|
@@ -42,6 +44,11 @@ try:
|
|
42 |
|
43 |
logger.info("###################### Program Entry ############################")
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
##########################################################################
|
46 |
# Asynchonously run startup.sh which run text2vec-transformers #
|
47 |
# asynchronously and the Weaviate Vector Database server asynchronously. #
|
|
|
22 |
import pprint
|
23 |
import io
|
24 |
|
25 |
+
import torch
|
26 |
+
|
27 |
|
28 |
|
29 |
try:
|
|
|
44 |
|
45 |
logger.info("###################### Program Entry ############################")
|
46 |
|
47 |
+
logger.info("CUDA available:", torch.cuda.is_available())
|
48 |
+
logger.info("CUDA device count:", torch.cuda.device_count())
|
49 |
+
if torch.cuda.is_available():
|
50 |
+
logger.info("CUDA device name:", torch.cuda.get_device_name(0))
|
51 |
+
|
52 |
##########################################################################
|
53 |
# Asynchonously run startup.sh which run text2vec-transformers #
|
54 |
# asynchronously and the Weaviate Vector Database server asynchronously. #
|