vukadinovic936 commited on
Commit
aa4251c
1 Parent(s): 5a97868
Files changed (3) hide show
  1. Dockerfile +11 -0
  2. app.py +12 -0
  3. requirements.txt +5 -0
Dockerfile ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM tensorflow/tensorflow:1.14.0-gpu-py3
2
+ RUN pip install jupyter
3
+
4
+ WORKDIR /data
5
+ COPY requirements.txt ./
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ EXPOSE 7860
9
+
10
+ COPY . .
11
+ CMD ["streamlit", "run", "app.py", "--server.port", "7860"]
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import tensorflow as tf
3
+
4
+ def check_gpu():
5
+ return tf.test.is_gpu_available(cuda_only=False, min_cuda_compute_capability=None)
6
+
7
+ st.title('GPU Availability Checker')
8
+
9
+ if check_gpu():
10
+ st.success('GPU is available!')
11
+ else:
12
+ st.warning('GPU is not available.')
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ requests
2
+ matplotlib
3
+ tqdm
4
+ ipywidgets
5
+ streamlit