| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,7 +51,10 @@ RUN pip install seaborn python-dateutil dask && \ | |||
| 51 | 51 | make -j $(nproc) && make install && \ | |
| 52 | 52 | /tmp/clean-layer.sh | |
| 53 | 53 | ||
| 54 | - RUN pip install tensorflow==2.0.0rc1 && \ | ||
| 54 | + # Install tensorflow from a pre-built wheel | ||
| 55 | + COPY --from=tensorflow_whl /tmp/tensorflow_cpu/*.whl /tmp/tensorflow_cpu/ | ||
| 56 | + RUN pip install /tmp/tensorflow_cpu/tensorflow*.whl && \ | ||
| 57 | + rm -rf /tmp/tensorflow_cpu && \ | ||
| 55 | 58 | /tmp/clean-layer.sh | |
| 56 | 59 | ||
| 57 | 60 | RUN apt-get install -y libfreetype6-dev && \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | ARG BASE_TAG=staging | |
| 2 | 2 | ||
| 3 | 3 | FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 AS nvidia | |
| 4 | + FROM gcr.io/kaggle-images/python-tensorflow-whl:2.0.0-rc1-py36 as tensorflow_whl | ||
| 4 | 5 | FROM gcr.io/kaggle-images/python:${BASE_TAG} | |
| 5 | 6 | ||
| 6 | 7 | ADD clean-layer.sh /tmp/clean-layer.sh | |
@@ -44,8 +45,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
| 44 | 45 | /tmp/clean-layer.sh | |
| 45 | 46 | ||
| 46 | 47 | # Reinstall packages with a separate version for GPU support. | |
| 48 | + COPY --from=tensorflow_whl /tmp/tensorflow_gpu/*.whl /tmp/tensorflow_gpu/ | ||
| 47 | 49 | RUN pip uninstall -y tensorflow && \ | |
| 48 | - pip install tensorflow-gpu==2.0.0rc1 && \ | ||
| 50 | + pip install /tmp/tensorflow_gpu/tensorflow*.whl && \ | ||
| 49 | 51 | rm -rf /tmp/tensorflow_gpu && \ | |
| 50 | 52 | conda remove --force -y pytorch-cpu torchvision-cpu && \ | |
| 51 | 53 | conda install -y pytorch torchvision cudatoolkit=10.0 -c pytorch && \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | 9 | class TestTensorflow(unittest.TestCase): | |
| 10 | 10 | def test_addition(self): | |
| 11 | - result = tf.add(2, 3) | ||
| 11 | + result = tf.add(2, 3) | ||
| 12 | 12 | self.assertEqual(5, result.numpy()) | |
| 13 | 13 | ||
| 14 | 14 | def test_conv2d(self): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments