Tag: Google Cloud Platform
-
Enabling Python VirtualEnv in JupyterLab
This post illustrates how you can enable Python virtualenv in GCP JupyterLab so that you can organize your .ipynb files to use different virtual environments to keep track of Python package dependencies. PROBLEM You are using GCP JupyterLab. You want to adhere to the Python development best practices by not polluting the global environment with… Read More…
-
GCSFuse + Docker: “Error while creating mount source path ‘/a’: mkdir /a: file exists.”
This post illustrates how you can mount a GCS bucket using GCSFuse on your host machine and expose it as a volume to a Docker container. PROBLEM You want to volume mount a FUSE-mounted directory to a container, for example: When attempting to run the container… … an error occurred: SOLUTION Unmount the existing FUSE-mounted… Read More…
-
GCP: Accessing GUI-Based App in GCE from Mac using X11
PROBLEM You want to access a GUI-based software that is installed in a GCE instance without using NoMachine. SOLUTION GCE Instance (One Time Configuration) Ensure X11Forwarding is enabled and set to yes. If not, change it. If a change is made to this file, restart the service. Mac (One Time Configuration) Apple no longer include… Read More…
-
GCP: Pushing Codebase from IntelliJ IDEA to VM Instance
OBJECTIVE To push codebase from IntelliJ IDEA (or any JetBrains products) on a local machine to a VM instance in Google Cloud Platform. To run the codebase remotely. WHY DO THIS You want to leverage all the power of a modern IDE on your 4K screen. You do not want to use remote desktop tools… Read More…
-
GCP + Container Registry: Pushing/Pulling Images
PROBLEM You want to push a new image to Google Container Registry (GCR) or pull an existing image from GCR. SOLUTION Pushing a New Image to GCR Prepare your Dockerfile. Create an image and tag it with a path pointing to GCR within a project. There are several variations of GCR’s hostname (ex: gcr.io, us.gcr.io,… Read More…
-
GCP Logging Agent: Converting Unstructured to Structured Logging
BACKGROUND The GCP logging agent uses modified fluentd, which allows us to do either unstructured logging or structured logging. The structured logging relies on JSON payload while the unstructured logging can be any texts. The advantage of structured logging is we can leverage log features in GCP Log Viewer. UNSTRUCTURED LOGGING Installing the unstructured logging… Read More…