Project-MONAI / Project-MONAI/MONAI

Cannot use monai-deploy package by following offical tutorial

Open
#7,919 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Describe the bug
I followed this tutorial and failed.

I though is the conda environment problem until I found this tutorial without using conda.

so I simplify the steps as follow:

To Reproduce
Steps to reproduce the behavior:

  1. run command:
pip install fsspec
pip install monai-deploy-app-sdk
  1. Install cuda-toolkit.

  2. run command:

export PATH=/usr/local/cuda-12.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.5/lib64:$LD_LIBRARY_PATH
sudo apt install docker-buildx
git clone --branch main --depth 1 https://github.com/Project-MONAI/monai-deploy-app-sdk.git
cd monai-deploy-app-sdk
pip install scikit-image setuptools Pillow matplotlib
chmod +777 /tmp/requirements.txt
monai-deploy package examples/apps/simple_imaging_app -c examples/apps/simple_imaging_app/app.yaml -t simple_app:latest --platform x64-workstation -l DEBUG

Expected behavior
Stop here:

#19 [14/19] RUN pip install --no-cache-dir --user -r /tmp/requirements.txt
#19 0.408 ERROR: Could not open requirements file: [Errno 13] Permission denied: '/tmp/requirements.txt'
#19 ERROR: process "/bin/sh -c pip install --no-cache-dir --user -r /tmp/requirements.txt" did not complete successfully: exit code: 1
------
 > [14/19] RUN pip install --no-cache-dir --user -r /tmp/requirements.txt:
0.408 ERROR: Could not open requirements file: [Errno 13] Permission denied: '/tmp/requirements.txt'
------
WARNING: local cache import at /home/ubuntu/.holoscan_build_cache not found due to err: could not read /home/ubuntu/.holoscan_build_cache/index.json: open /home/ubuntu/.holoscan_build_cache/index.json: no such file or directory
Dockerfile:72
--------------------
  70 |
  71 |     RUN pip install --upgrade pip
  72 | >>> RUN pip install --no-cache-dir --user -r /tmp/requirements.txt
  73 |
  74 |
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir --user -r /tmp/requirements.txt" did not complete successfully: exit code: 1
[2024-07-15 10:00:51,769] [INFO] (packager) - Build Summary:

Platform: x64-workstation/dgpu
    Status: Failure
    Error:  Error building image: see Docker output for additional details.

Screenshots
image

Environment
AWS EC2 NVIDIA GPU Optimized AMI. g5.xlarge instance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked simple app tutorial, the packaging command, and the generated Dockerfile at line 72, where installation of /tmp/requirements.txt fails with permission denied. Reproduce the build in the stated AWS EC2 NVIDIA GPU environment and compare the requirements-file permissions during image construction. Done means the official tutorial's packaging command completes successfully without the reported Docker build error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.