From c1c2795e423282e1fe81882a7c6e2ee10b8c43f0 Mon Sep 17 00:00:00 2001 From: Malte Grosse Date: Thu, 30 Nov 2023 09:45:04 +0900 Subject: [PATCH] try --- .woodpecker.yml | 4 ++-- run.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 run.py diff --git a/.woodpecker.yml b/.woodpecker.yml index 251fd8a..bdaecb0 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,8 +1,8 @@ steps: "caffe": - image: lablup/ngc-tensorflow:21.10-tf2-py3 + image: nvcr.io/nvidia/tensorflow:23.10-tf2-py3 commands: - echo "ci working................b. " - - sleep 100000 + - python run.py diff --git a/run.py b/run.py new file mode 100644 index 0000000..ee5b441 --- /dev/null +++ b/run.py @@ -0,0 +1,29 @@ +import tensorflow as tf +from tensorflow import keras +import matplotlib.pyplot as plt +import numpy as np +import os +# Version Information +# tensorflow 2.2.0 , Cudnn7.6.5 and Cuda 10.1 , python 3.8 +from keras import backend as K +K.clear_session() + +gpus = tf.config.experimental.list_physical_devices('GPU') +if gpus: + try: + tf.config.experimental.set_virtual_device_configuration(gpus[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=6024)]) + except RuntimeError as e: + print(e) + os.exit(1) + +print(tf.config.experimental.list_physical_devices()) + +print(tf.__version__) + +print(tf.test.is_built_with_cuda()) + +(X_train, y_train), (X_test,y_test) = tf.keras.datasets.cifar10.load_data() + +(X_train, y_train), (X_test,y_test) = tf.keras.datasets.cifar10.load_data() + +print(X_train.shape,y_train.shape) \ No newline at end of file