Minio ModulenotFoundError运行气流Docker图像

发布于 2025-01-31 21:17:15 字数 411 浏览 2 评论 0原文

我已经下载了最新的Docker映像,用于气流,并能够成功地旋转实例。在本地系统上,我在Mac上使用Homebrew安装了Minio服务器。

我创建了一个DAG文件,将数据上传到我的Minio Bucket。我已经使用Python进行了样本上传,并且它正常工作(使用Minio Python库)。在气流服务器上,我看到以下错误 -

ModulenotFoundError:没有名为“ Minio”的模块

可以帮助我将PIP3 Minio库带到Docker容器以便解决此错误可以解决吗?我是容器的新手,非常感谢我可以参考的简单指南或链接来帮助我解决此错误。

我尝试的一件事是摆弄属性-_pip_additional_requirtement -apache-airflow“>链接,但无济于事。

我将值添加为-Minio,但不起作用。

I have downloaded the latest Docker image for the Airflow and am able to spin up the instance succesfully. On my local system I have installed minio server using homebrew on my Mac.

I have created a DAG file to upload data to my Minio bucket. I have done a sample upload using python and it is working as expected (using the minio python libraries). On the Airflow server I am seeing the following errors -

ModuleNotFoundError: No module named 'minio'

Can someone pleae help me how can I have the pip3 minio library to the docker container so that this error can be resolved? I am new to containers and would really appreciate a easy guide or link that I can refer to help me with this error.

One of the things I did try is to fiddle with the attribute - _PIP_ADDITIONAL_REQUIREMENTS that comes in the AIRFLOW DOCKER image following this link but to no avail.

I added the values as - minio but didn't work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城之時有危險 2025-02-07 21:17:15

您可以创建一个扩展基本气流并安装软件包的Dockerfile。

  1. 创建Dockerfile
 来自Apache/Airflow:2.3.0

用户根

运行APT-GET更新

用户气流

运行pip install -u pip

运行PIP安装-NO-CACHE-DIR MINIO#,或者您可以复制需求。txt并从中安装
 
  1. 构建您的码头机

docker build -t my_docker。

  1. 运行新的Docker映像(如果您使用的是Docker-Compose,然后将气流图像更改为您的图像)

you can create a Dockerfile that extend the basic airflow and install your packages.

  1. Create Dockerfile
FROM apache/airflow:2.3.0

USER root

RUN apt-get update

USER airflow

RUN pip install -U pip

RUN pip install --no-cache-dir minio # or you can copy requirments.txt and install from it
  1. Build your docker

docker build -t my_docker .

  1. Run the new docker image (if you are using the docker-compose then change the airflow image to your image)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文