Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with virtual env in custom image #774

Open
1 of 2 tasks
alexkreidler opened this issue Dec 11, 2024 · 2 comments
Open
1 of 2 tasks

Issue with virtual env in custom image #774

alexkreidler opened this issue Dec 11, 2024 · 2 comments

Comments

@alexkreidler
Copy link

Bug description

Hi I'm trying to use a custom image with a python virtual env setup with Pixi but I'm getting this error:

2024-12-09 01:39:48,406 - ERROR - Exiting worker due to startup error
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/beta9/runner/common.py", line 242, in execute_lifecycle_method
result = method()
File "/mnt/code/src/beam_server.py", line 4, in init_models
from marker.converters.pdf import PdfConverter
ModuleNotFoundError: No module named 'marker'

This is the relevant part of my Dockerfile (linked to full repo):

RUN pixi install
ENV PATH=/app/.pixi/envs/default/bin:$PATH
ENV CONDA_PREFIX=/app/.pixi/envs/default

CMD ["uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "8000"]

I'm wondering what Python interpreter/virtual env beta9 uses to run startup code and if is different than what is used to run the regular function code. Or if there's any way to get it to use the right virtualenv interpreter specified in my Dockerfile.

How to reproduce

  1. Clone the repo
  2. Run beam deploy src/beam_server.py:handler
  3. curl -X POST 'https://<yourendpoint>.app.beam.cloud/convert' and see the error in the logs (it retries 3 times)

Environment

  • Beam Self-Hosted
  • Beam Cloud, app ID: 49d16420-e26d-4d7f-92ec-c94ab188c2d5 marker-pdf-converter
@sethhen
Copy link

sethhen commented Jan 12, 2025

Did you figure this one out?

@mernit
Copy link
Contributor

mernit commented Jan 17, 2025

Hi @alexkreidler this seems like a missing package required for running the application, not any issue with Beam itself

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

No branches or pull requests

3 participants