esmf-org / esmf-profiler

ESMF Profiler application converts binary traces into a web based, dynamic report.
0 stars 2 forks source link

Docker run fails with PackageNotFoundError #161

Closed rsdunlapiv closed 2 years ago

rsdunlapiv commented 2 years ago

Describe the bug After successfully building the Dockerfile, trying to run the docker container results in an error.

Docker Build succeeds:

Step 12/12 : RUN ["python3", "-m", "pip", "install", "-e", "."]
 ---> Running in 1419d0ef8802
Obtaining file:///home/esmf-profiler
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Installing collected packages: esmf-profiler
  Running setup.py develop for esmf-profiler
Successfully installed esmf-profiler
Removing intermediate container 1419d0ef8802
 ---> 8fb6142dbf03
Successfully built 8fb6142dbf03
Successfully tagged esmf-profiler-image:latest

Run fails:

rocky@rocky-Latitude-E5570:~/esmfdev/esmf-profiler$ docker run -it -v $(pwd)/testout:/home/testout esmf-profiler-image esmf-profiler -t /home/esmf-profiler/tests/fixtures/test-traces/atm-ocn-concurrent -n 'automatedtest' -o /home/testout
Traceback (most recent call last):
  File "/usr/bin/esmf-profiler", line 33, in <module>
    sys.exit(load_entry_point('esmf-profiler', 'console_scripts', 'esmf-profiler')())
  File "/usr/bin/esmf-profiler", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: esmf-profiler

To Reproduce Follow the test procedure to build and run the docker container.

Expected behavior Docker run should succeed.

Desktop (please complete the following information):

rsdunlapiv commented 2 years ago

@ryanlong1004 can we also add an automated test to build the Dockerfile and run the container?

ryanlong1004 commented 2 years ago

Merged to development in #163.