FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #597 from Kaggle/feat-add-gcloud · HpcDataLab/docker-python@7762da7 · GitHub

Commit 7762da7

Browse files
authored
Merge pull request Kaggle#597 from Kaggle/feat-add-gcloud
Add gcloud SDK to docker-python
2 parents 77faf5d + 43662c1 commit 7762da7

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,14 @@ RUN pip install --upgrade dask && \
529529
mkdir -p /etc/ipython/ && echo "c = get_config(); c.IPKernelApp.matplotlib = 'inline'" > /etc/ipython/ipython_config.py && \
530530
/tmp/clean-layer.sh
531531

532+
# gcloud SDK https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
533+
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" \
534+
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
535+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
536+
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
537+
apt-get update -y && apt-get install google-cloud-sdk -y && \
538+
/tmp/clean-layer.sh
539+
532540
# Add BigQuery client proxy settings
533541
ENV PYTHONUSERBASE "/root/.local"
534542
ADD patches/kaggle_gcp.py /root/.local/lib/python3.6/site-packages/kaggle_gcp.py

‎tests/test_gcloud.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import os
2+
import subprocess
3+
import unittest
4+
5+
class TestGcloud(unittest.TestCase):
6+
def test_version(self):
7+
result = subprocess.run([
8+
'gcloud',
9+
'--version',
10+
],
11+
stdout=subprocess.PIPE,
12+
)
13+
14+
self.assertTrue(result.returncode == 0)
15+
self.assertTrue(b'Google Cloud SDK' in result.stdout)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL