#!/usr/bin/env python312# coding=utf-83# Copyright 2023 The HuggingFace Inc. team.4#5# Licensed under the Apache License, Version 2.0 (the "License");6# you may not use this file except in compliance with the License.7# You may obtain a copy of the License at8#9# http://www.apache.org/licenses/LICENSE-2.010#11# Unless required by applicable law or agreed to in writing, software12# distributed under the License is distributed on an "AS IS" BASIS,13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14# See the License for the specific language governing permissions and15# limitations under the License.1617# this script dumps information about the environment1819import os20import platform21import sys222324os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"2526print("Python version:", sys.version)2728print("OS platform:", platform.platform())29print("OS architecture:", platform.machine())3031try:32import torch3334print("Torch version:", torch.__version__)35print("Cuda available:", torch.cuda.is_available())36print("Cuda version:", torch.version.cuda)37print("CuDNN version:", torch.backends.cudnn.version())38print("Number of GPUs available:", torch.cuda.device_count())39except ImportError:40print("Torch version:", None)4142try:43import transformers4445print("transformers version:", transformers.__version__)46except ImportError:47print("transformers version:", None)484950