i2bc / SURFMAP

Other
20 stars 3 forks source link

[Bug]: Could not use the docker in labs server computer. #17

Closed Biosuperkitty closed 1 week ago

Biosuperkitty commented 6 months ago

Operating System

Unix (e.g., Ubuntu 20.04)

Version

2.0.0

Python Version (optional)

No response

Python Virtual Environment

Not using a virtual environment

Execution Environment

Encapsulated environment from the SURFMAP Docker image

Bug Description

Thank you for taking the time to read my message.

I am new to the field of bioinformatics and recently came across a valuable software called Surfmap on GitHub. I believe that Surfmap is an excellent tool for protein structure research.

However, when I tried using Surfmap on our lab's server computer with the following command: "surfmap -pdb foo.pdb -tomap stickiness --docker", I encountered an error:

Traceback (most recent call last): File "/surfmap/.env/bin/surfmap", line 33, in sys.exit(load_entry_point('surfmap', 'console_scripts', 'surfmap')()) File "/surfmap/surfmap/bin/surfmap.py", line 55, in main set_root_logger(outpath=params.outdir, level=params.verbose) File "/surfmap/surfmap/lib/logs.py", line 90, in set_root_logger file_handler = logging.FileHandler(filename=log_filename, mode="w+") File "/usr/lib/python3.10/logging/init.py", line 1169, in init StreamHandler.init(self, self._open()) File "/usr/lib/python3.10/logging/init.py", line 1201, in _open return open_func(self.baseFilename, self.mode, PermissionError: [Errno 13] Permission denied: '/home/surfmap/output/surfmap.log'

I am unsure if this issue is caused by a bug in our system or in Docker. Is there anything I can do to resolve this problem? Your assistance would be greatly appreciated.

Thank you once again for your time.

Steps to Reproduce

conda activate surfmap surfmap -pdb foo.pdb -tomap stickiness --docker

Relevant Log Output

Traceback (most recent call last):
File "/surfmap/.env/bin/surfmap", line 33, in <module>
sys.exit(load_entry_point('surfmap', 'console_scripts', 'surfmap')())
File "/surfmap/surfmap/bin/surfmap.py", line 55, in main
set_root_logger(outpath=params.outdir, level=params.verbose)
File "/surfmap/surfmap/lib/logs.py", line 90, in set_root_logger
file_handler = logging.FileHandler(filename=log_filename, mode="w+")
File "/usr/lib/python3.10/logging/init.py", line 1169, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.10/logging/init.py", line 1201, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/home/surfmap/output/surfmap.log'

Additional context (optional)

No response

Confirmation

nchenche commented 6 months ago

Hello,

First of all, thank you for your interest in SURFMAP.

It seems like your are not allowed to create '/home/surfmap/output/surfmap.log' and right now i don't understand why...

Do you have the write permission on your local environment, id est at the location you are when you enter the command surfmap -pdb foo.pdb -tomap stickiness --docker? To check it, please send me the result of ls -l from the location you were trying to run surfmap.

Also, are you sure of the surfmap docker version you are using? Could you please verify it with the command surfmap -v?

Thanks

Biosuperkitty commented 6 months ago

Thank you for your kind reply. Here is the result of "ls -l" from the location where I attempted to run surfmap:

drwxrwxr-x 5 Ian Ian 4096 Dec 30 16:59 result drwxrwxr-x 6 Ian Ian 4096 Dec 30 16:56 sample The result of "surfmap -v" is:

SURFMAP: Projection of protein surface features on 2D map Copyright (C) 2021 H. Schweke Version: 2.0.0 In addition, since I could not use docker images, I tried to install the software as you mentioned. I was able to successfully use "surfmap -pdb foo.pdb -tomap stickiness" to produce 2D figures without docker, and the results look good.

Thank you again for your time.

nchenche commented 6 months ago

Dear Xielong (i guess),

First be aware that i moved the second part of your message and created a new issue from it as it does not directly relate to your first issue. Indeed, as a managing perspective, it is not practical for anyone to mix up multiple unrelated issues. I have answered it here.

Next, I see that username of the surfmap user (xielong) and username of the owner of the directory you are expecting results (Ian) do not match:

drwxrwxr-x 5 Ian Ian 4096 Dec 30 16:59 result
drwxrwxr-x 6 Ian Ian 4096 Dec 30 16:56 sample
# output taken from https://github.com/i2bc/SURFMAP/issues/18
...
File "/home/xielong/miniconda3/envs/surfmap/bin/surfmap", line 8
...

It could explain your issue since, if it is the case, xielong user running surfmap will not be allowed to write on Ian directories.

Please let me know if I got wrong and misinterpret it.

Biosuperkitty commented 6 months ago

Thank you for your kind response. I relocated the file to my personal folder, and do "chmod 777" to my working folder, and now it is functioning perfectly. The issue has been resolved, and I would like to express my sincere gratitude for your assistance.

Haha. (But I found docker is much slower than primary using) let's move to the next issue.