diff --git a/src/options/generate/generator.py b/src/options/generate/generator.py index f3ef5fe..4174ce7 100644 --- a/src/options/generate/generator.py +++ b/src/options/generate/generator.py @@ -216,7 +216,7 @@ metas: def parse_result_fn_dockerfile(self, content_raw: str): json_string = self.extract_content_from_result(content_raw, 'apt-get-packages.json', match_single_block=True) - packages = json.loads(json_string)['packages'] + packages = ' '.join(json.loads(json_string)['packages']) docker_file_template = self.read_docker_template() return {DOCKER_FILE_NAME: docker_file_template.replace('{{apt_get_packages}}', '{apt_get_packages}').format(apt_get_packages=packages)} diff --git a/src/options/generate/templates_user.py b/src/options/generate/templates_user.py index aba7c60..266408b 100644 --- a/src/options/generate/templates_user.py +++ b/src/options/generate/templates_user.py @@ -181,16 +181,23 @@ Name all packages which need to be installed via `apt-get install` in above Dock Note that you must not list apt-get packages that are already installed in the Dockerfile. Note that openai does not require any apt-get packages. -Note that you only list packages where you are highly confident that they are really needed. +Note that you are only allowed to list packages where you are highly confident that they are really needed. +Note that you can assume that the standard python packages are already installed. Output the packages that need to me placed at {{apt_get_packages}} as json in the following format: **apt-get-packages.json** ```json {{"packages": ["", ""]}} ``` -Have in mind that the packages list can be empty like this: +Example for the following requirements.txt file: +**requirements.txt** +``` +numpy==1.19.5 +fitz +``` +The output would be: **apt-get-packages.json** ```json -{{"packages": []}} +{"packages": []} ``` ''' )