Hey all, I'm running metaflow (frontend and backen...
# ask-metaflow
i
Hey all, I'm running metaflow (frontend and backend) in kubernetes alongside jupyterhub. I'm logged into jupyterhub attempting to run a very simple flow for a demo, but it has been hanging on "Bootstrapping virtual environment(s)..." for 45 minutes. CPU: requests: 2 limits: 8 actual usage: 2millicore Memory: requests: 4Gi limits: 32Gi actual usage: 1100Mi FlowSpec:
Copy code
import pandas as pd
from metaflow import FlowSpec, step, pypi_base, kubernetes


@pypi_base(packages={"pandas": "2.2.3"})
class KubernetesFlow(FlowSpec):
    """Sample Metaflow Flow"""

    @step
    def start(self):
        """Start step"""
        self.x = 1
        print("MF pipe is starting.")
        self.next(self.p1, self.p2)

    # When running on macbooks with an M-chip, we need to specify an
    # image that has specifically been built with --platform=linux/amd64
    # in order to prevent some wonky file system issues.
    @kubernetes(cpu=2, memory=1200)
    @step
    def p1(self):
        """First parallel step"""
        self.hi = pd.DataFrame([{"hello": "there"}])
        print("Executing first parallel step.")
        self.next(self.join)

    @step
    def p2(self):
        """Second parallel step"""
        print("Executing second parallel step.")
        self.next(self.join)

    @step
    def join(self, artifacts):
        """Join step"""
        print("Executing join step.")

        print(f"Artifacts from p1: {artifacts}")
        self.next(self.end)

    @step
    def end(self):
        """End step"""
        print("MF pipe is all done.")


if __name__ == "__main__":
    KubernetesFlow()
1
a
Interesting - are you able to connect to the s3 buckets from your instance?
i
Ah great point, I don't think I ever granted this service account IAM access.