-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Description
Error when building a detectron2 on docker
Hello. Im experiencing a weird behavior where if im building a docker with detectron2 it always showing an error
3.930 × python setup.py egg_info did not run successfully.
3.930 │ exit code: 1
3.930 ╰─> [6 lines of output]
3.930 Traceback (most recent call last):
3.930 File "<string>", line 2, in <module>
3.930 File "<pip-setuptools-caller>", line 34, in <module>
3.930 File "/tmp/pip-req-build-sz8hbgh3/setup.py", line 10, in <module>
3.930 import torch
3.930 ModuleNotFoundError: No module named 'torch'
3.930 [end of output]
Here is my Dokerfile
FROM public.ecr.aws/lambda/python:3.9
# Install Git
RUN yum install -y git
# Copy requirements.txt
COPY requirements.txt ./
# Install the specified packages
RUN pip3 install -r requirements.txt;
COPY sample.py ./
CMD [ "sampl.handler"]
Here is my requirements.txt
boto3==1.28.62
Pillow==10.0.1
numpy==1.24.3
torch==2.0.0
torchvision==0.15.1
opencv-python==4.6.0.66
git+https://github.com/facebookresearch/detectron2.git
Metadata
Metadata
Assignees
Labels
No labels