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

Run Error in the Docker #9

Open
kirishima-mign opened this issue Jul 10, 2024 · 2 comments
Open

Run Error in the Docker #9

kirishima-mign opened this issue Jul 10, 2024 · 2 comments

Comments

@kirishima-mign
Copy link

Thanks for the awesome project!
When I build a Dockerfile and run in an EC2 instance, I get the following error.
I don't know what the solution is and would like your advice.

### Dockerfile ###
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04

WORKDIR /app
COPY . /app

RUN apt-get update && apt-get install -y \
    wget \
    git \
    libgl1-mesa-glx \
    libglib2.0-0 \
    python3.10 \
    python3.10-venv \
    python3.10-dev \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

RUN python3.10 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

RUN pip install --upgrade pip

COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
RUN pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2

RUN pip install fvcore iopath
RUN pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu117_pyt201/download.html

RUN pip install git+https://github.com/facebookresearch/segment-anything.git
RUN pip install openai==0.28.1
RUN pip install ipdb
RUN pip uninstall -y timm
RUN pip install timm==0.6.7

RUN pip install spacy
RUN python3 -m spacy download en_core_web_sm

RUN mkdir -p /viscam/projects/wonderland/segment-anything && \
    wget -L -O /viscam/projects/wonderland/segment-anything/sam_vit_h_4b8939.pth https://huggingface.co/spaces/abhishek/StableSAM/blob/main/sam_vit_h_4b8939.pth

RUN wget https://github.com/isl-org/MiDaS/releases/download/v3_1/dpt_beit_large_512.pt -P /app

ENV OPENAI_API_KEY='MY_OPENAI_API_KEY'
$ python3 run.py --example_config config/village.yaml
running with seed: 3382461321.
preprocessor_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████| 6.82k/6.82k [00:00<00:00, 53.3MB/s]
/opt/venv/lib/python3.10/site-packages/transformers/utils/deprecation.py:165: UserWarning: The following named arguments are not valid for OneFormerImageProcessor.__init__ and were ignored: '_max_size'
  return func(*args, **kwargs)
coco_panoptic.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 5.85k/5.85k [00:00<00:00, 52.4MB/s]
tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 806/806 [00:00<00:00, 7.72MB/s]
vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 1.06M/1.06M [00:00<00:00, 2.48MB/s]
merges.txt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 1.87MB/s]
special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 472/472 [00:00<00:00, 5.20MB/s]
config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 82.6k/82.6k [00:00<00:00, 242MB/s]
pytorch_model.bin: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 879M/879M [01:31<00:00, 9.65MB/s]
/opt/venv/lib/python3.10/site-packages/torch/_utils.py:776: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
invalid load key, '-'.
> /opt/venv/lib/python3.10/site-packages/torch/serialization.py(1033)_legacy_load()
   1032 
-> 1033     magic_number = pickle_module.load(f, **pickle_load_args)
   1034     if magic_number != MAGIC_NUMBER:

ipdb>
@minyan8
Copy link

minyan8 commented Dec 25, 2024

I met the same problem. any solotuion?

@minyan8
Copy link

minyan8 commented Dec 25, 2024

`

/opt/venv/lib/python3.10/site-packages/torch/serialization.py(1338)_legacy_load()
1337
-> 1338 magic_number = pickle_module.load(f, **pickle_load_args)
1339 if magic_number != MAGIC_NUMBER:
ipdb>

`

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

2 participants