我正在尝试对TensorFlow模型进行泊坞化,但出现错误:
Exception: URL fetch failure on https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)
在我的本地计算机上,我的代码运行良好,但是当我尝试运行容器时,出现此错误。
Dockerfile
FROM continuumio/miniconda
RUN conda update --all && pip install --upgrade tensorflow==2.0.0-beta1
RUN conda install matplotlib
RUN conda install pyqt
RUN apt-get update && apt-get install -yq libgl1-mesa-glx
COPY kerastensorflow.py .
CMD ["python", "kerastensorflow.py"]
我的模特:
from __future__ import absolute_import, division, print_function, unicode_literals
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import PyQt5
import matplotlib.pyplot as plt
fashion_mnist = keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
...