ncbi / pgap

NCBI Prokaryotic Genome Annotation Pipeline
Other
294 stars 89 forks source link

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

Closed MrTomRod closed 5 months ago

MrTomRod commented 10 months 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 9 months 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 5 months ago

Yes, it works!

azat-badretdin commented 5 months ago

Excellent! Thanks for confirming, Thomas!