Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

slackbot-demo issue and local deploy issue on Mac M1 #137

Open
ammirsm opened this issue Aug 4, 2023 · 3 comments
Open

slackbot-demo issue and local deploy issue on Mac M1 #137

ammirsm opened this issue Aug 4, 2023 · 3 comments

Comments

@ammirsm
Copy link

ammirsm commented Aug 4, 2023

Tried to run your default https://github.com/jina-ai/langchain-serve/tree/main/lcserve/apps/slackbot and faced the issue below:

❯ lc-serve deploy slackbot-demo --env .env

⠼ Pushing `/var/folders/w9/h00950gs1jb8fhvzphb53lbh0000gn/T/tmp8uwkazhr` ...🔐 You are logged in to Jina AI as USER (username: APP). To log out, use jina auth logout.

Failed on building Docker image. Potential solutions:
  - If you haven't provide a Dockerfile in the executor bundle, you may want to provide one,
    as the auto-generated one on the cloud did not work.
  - If you have provided a Dockerfile, you may want to check the validity of this Dockerfile.

Please report this session_id: [yellow bold]41eb12b4-32ee-11ee-b328-c210cfc82d17[/] to https://github.com/jina-ai/jina-hubble-sdk/issues
Traceback (most recent call last):
  File "/Users/USER/workspace/APP-chat/venv/bin/lc-serve", line 8, in <module>
    sys.exit(serve())
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/flow.py", line 48, in wrapper
    return asyncio.run(f(*args, **kwargs))
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/nest_asyncio.py", line 35, in run
    return loop.run_until_complete(task)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/nest_asyncio.py", line 90, in run_until_complete
    return f.result()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/__main__.py", line 924, in slackbot_demo
    await serve_slackbot_demo_on_jcloud(
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/__main__.py", line 297, in serve_slackbot_demo_on_jcloud
    await serve_on_jcloud(
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/__main__.py", line 89, in serve_on_jcloud
    gateway_id = push_app_to_hubble(
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/flow.py", line 381, in push_app_to_hubble
    return _push_to_hubble(tmpdir, image_name, tag, platform, verbose, public)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/flow.py", line 351, in _push_to_hubble
    gateway_id = HubIO(args).push().get('id')
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/hubble/__init__.py", line 48, in arg_wrapper
    return func(*args, **kwargs)
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/hubble/executor/hubio.py", line 596, in push
    raise e
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/hubble/executor/hubio.py", line 579, in push
    image = self._send_push_request(
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/hubble/executor/hubio.py", line 399, in _send_push_request
    raise Exception(
Exception: 
Failed on building Docker image. Potential solutions:
  - If you haven't provide a Dockerfile in the executor bundle, you may want to provide one,
    as the auto-generated one on the cloud did not work.
  - If you have provided a Dockerfile, you may want to check the validity of this Dockerfile.
 session_id: 41eb12b4-32ee-11ee-b328-c210cfc82d17

Beside of this on my system when I try to run the local deploy it won't run and give me warning like below:

❯ lc-serve deploy local app

⠋ Waiting ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 -:--:--Traceback (most recent call last):
  File "/Users/USER/workspace/APP-chat/venv/lib/python3.9/site-packages/lcserve/backend/gateway.py", line 433, in _register_mod
    app_module = import_module(mod)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/USER/workspace/APP-chat/app.py", line 12, in <module>
    import config
ModuleNotFoundError: No module named 'config'
ERROR  gateway/rep-0@8969 Unable to import module: app as No module named 'config'                                                                                                                                                                                                              [08/04/23 12:02:17]
⠙ Waiting gateway... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:00objc[8969]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[8969]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 🎉 Flow is ready to serve! ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
╭────────────── 🔗 Endpoint ───────────────╮
│  ⛓      Protocol                   HTTP  │
│  🏠        Local           0.0.0.0:8080  │
│  🔒      Private         10.0.0.30:8080  │
│  🌍       Public     68.144.94.140:8080  │
╰──────────────────────────────────────────╯
╭─────────── 💎 HTTP extension ────────────╮
│  💬          Swagger UI        .../docs  │
│  📚               Redoc       .../redoc  │
╰──────────────────────────────────────────╯
Do you love open source? Help us improve Jina in just 1 minute and 30 seconds by taking our survey: https://10sw1tcpld4.typeform.com/jinasurveyfeb23?utm_source=jina (Set environment variable JINA_HIDE_SURVEY=1 to hide this message.)
@deepankarm deepankarm transferred this issue from jina-ai/jina-hubble-sdk Aug 7, 2023
@deepankarm
Copy link
Member

Can you please check if passing --platform linux/amd64 helps during the deployment? If not, please add --verbose to the deploy jcloud command and share the logs.

@zac-li
Copy link
Member

zac-li commented Aug 7, 2023

Regarding the second question, please make sure config can be found during import

@gmAnthony
Copy link

I'm on an M1 and was running into the same issue and passing --platform linux/amd64 worked for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants