ncbi / pgap

NCBI Prokaryotic Genome Annotation Pipeline
Other
316 stars 88 forks source link

[BUG] Podman: container name is not respected #270

Closed MrTomRod closed 9 months ago

MrTomRod commented 1 year ago

In pgap.py's make_podman_cmd, the parameter --container-name is only respected if debug is True. The indentation is wrong imo:

    def make_podman_cmd(self):
...
        if self.params.args.debug:
            log_dir = self.params.outputdir + '/debug/log'
            os.makedirs(log_dir, exist_ok=True)
            self.cmd.extend(['--volume', '{}:/log/srv'.format(log_dir)])
            if self.params.args.container_name:
                self.cmd.extend(['--name', self.params.args.container_name])
        self.cmd.append(self.params.docker_image)

Should be:

    def make_podman_cmd(self):
...
        if self.params.args.debug:
            log_dir = self.params.outputdir + '/debug/log'
            os.makedirs(log_dir, exist_ok=True)
            self.cmd.extend(['--volume', '{}:/log/srv'.format(log_dir)])
        if self.params.args.container_name:
            self.cmd.extend(['--name', self.params.args.container_name])
        self.cmd.append(self.params.docker_image)
azat-badretdin commented 1 year ago

Hi, Thomas! Thank you for your report. Have you tried our October/2023 version? We fixed it according to our release notes.

MrTomRod commented 9 months ago

Yes, it works!

azat-badretdin commented 9 months ago

Excellent! Thanks for confirming, Thomas!