Skip to content

Bug: Tutorial failing when running deeprank2 as Dockerfile #524

@abhishektiwari

Description

@abhishektiwari

Describe the bug
I have created a custom Dockerfile to run deeprank2 on Mac M2,

# Pull base image.
FROM ubuntu:latest

# Install.
RUN \
  apt-get update && \
  apt-get -y upgrade && \
  apt-get install -y build-essential && \
  apt-get install -y software-properties-common && \
  apt-get install -y byobu curl git htop man unzip vim wget pip && \
  pip install deeprank2 notebook


# Add files.
ADD . /home/deeprank2

# Set environment variables.
ENV HOME /home

# Define working directory.
WORKDIR /home/deeprank2

# Define default command.
CMD ["bash"]

EXPOSE 3000

Environment:

  • OS system:
  • Version:
  • Branch commit ID:
  • Inputs:

To Reproduce
Steps/commands/screenshots to reproduce the behaviour:

Run from the root of deeprank2 repo,

docker build -t deeprank2 .

SSH to running container

docker run -it --expose 3000  -p 3000:3000 deeprank2

Run notebook

cd tutorials
jupyter notebook --ip 0.0.0.0 --no-browser --allow-root --port 3000

Expected Results
Executing data_generation_ppi.ipynb

Actual Results or Error Info

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[1], line 7
      5 import matplotlib.image as img
      6 import matplotlib.pyplot as plt
----> 7 from deeprank2.query import QueryCollection
      8 from deeprank2.query import ProteinProteinInterfaceResidueQuery, ProteinProteinInterfaceAtomicQuery
      9 from deeprank2.features import components, contact

File /usr/local/lib/python3.10/dist-packages/deeprank2/query.py:21
     19 import deeprank2.features
     20 from deeprank2.domain.aminoacidlist import convert_aa_nomenclature
---> 21 from deeprank2.features import components, conservation, contact
     22 from deeprank2.molstruct.aminoacid import AminoAcid
     23 from deeprank2.molstruct.atom import Atom

File /usr/local/lib/python3.10/dist-packages/deeprank2/features/components.py:10
      8 from deeprank2.molstruct.residue import Residue, SingleResidueVariant
      9 from deeprank2.utils.graph import Graph
---> 10 from deeprank2.utils.parsing import atomic_forcefield
     12 _log = logging.getLogger(__name__)
     14 def add_features( # pylint: disable=unused-argument
     15     pdb_path: str, graph: Graph,
     16     single_amino_acid_variant: Optional[SingleResidueVariant] = None
     17     ):

File /usr/local/lib/python3.10/dist-packages/deeprank2/utils/parsing/__init__.py:112
    108         else:
    109             return charge
--> 112 atomic_forcefield = AtomicForcefield()

File /usr/local/lib/python3.10/dist-packages/deeprank2/utils/parsing/__init__.py:20, in AtomicForcefield.__init__(self)
     16 def __init__(self):
     17     top_path = os.path.join(
     18         _forcefield_directory_path,
     19         "protein-allhdg5-5_new.top")
---> 20     with open(top_path, 'rt', encoding = 'utf-8') as f:
     21         self._top_rows = {(row.residue_name, row.atom_name): row for row in TopParser.parse(f)}
     23     patch_path = os.path.join(_forcefield_directory_path, "patch.top")

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/deeprank2/domain/forcefield/protein-allhdg5-5_new.top'

Metadata

Metadata

Assignees

No one assigned

    Labels

    JOSSbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions