{"id":23160835,"url":"https://github.com/zcsadmin/docker-image-python","last_synced_at":"2025-04-04T19:27:26.312Z","repository":{"id":257765638,"uuid":"858971801","full_name":"zcsadmin/docker-image-python","owner":"zcsadmin","description":"Base docker image definition for ZCS python applications","archived":false,"fork":false,"pushed_at":"2024-09-18T08:52:50.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-18T15:39:35.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcsadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-17T21:10:42.000Z","updated_at":"2024-09-18T10:15:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c283105-6911-4631-879d-8349b7c049bf","html_url":"https://github.com/zcsadmin/docker-image-python","commit_stats":null,"previous_names":["zcsadmin/docker-image-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcsadmin%2Fdocker-image-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcsadmin%2Fdocker-image-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcsadmin%2Fdocker-image-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcsadmin%2Fdocker-image-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcsadmin","download_url":"https://codeload.github.com/zcsadmin/docker-image-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247236706,"owners_count":20906178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T23:12:19.667Z","updated_at":"2025-04-04T19:27:26.307Z","avatar_url":"https://github.com/zcsadmin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZCS Python docker images\n\nDocker images used for ZCS Python applications.\n\nSupported python versions:\n\n- `3.12`\n- `3.11`\n\nSupported torch versions:\n\n- `2.4.0`\n- `2.4.1`\n- `2.5.0`\n- `2.5.1`\n- `2.6.0`\n\nSupported platforms:\n\n- `linux/amd64`\n- `linux/arm64`\n\n## Example usage\n\nZCS Python docker images are available in three flavours:\n\n- `base`: base image, mainly used by other stages\n- `dev`: image for local development\n- `dist`: image used for application distribution\n- `torch-cpu`: image for distributing the final application with torch-cpu library\n\n### Docker image for local development\n\nThe docker image for local development support permissions mapping between host user and docker user. \n\nDockerfile definition to use `dev` image in local environment mapping the image `bob` user to host user:\n\n```docker\nFROM zcscompany/python:3.11-dev AS dev\n\nARG FIX_UID\nARG FIX_GID\n\nUSER 0\nRUN /fix-perm.sh\n\n# Run as normal user\nUSER bob\n```\n\nBuild command: \n```bash\ndocker build --build-arg FIX_UID=\"$(id -u)\" --build-arg FIX_GID=\"$(id -g)\" .\n```\n\n### Docker image for target application with torch-cpu library\n\nDockerfile definition\n\n```docker\nFROM zcscompany/python:3.11-torch-cpu-2.4.0\n\n# Copy application requirement file\nCOPY --chown=bob:bob app/requirements.txt .\n\n# Install app requirements\nRUN pip install --user --no-cache-dir --disable-pip-version-check -r requirements.txt\n\n# Copy application code\nCOPY --chown=bob:bob app/ .\n\n# Build and install the library\nRUN python -m build \u0026\u0026 \\\n    pip install --user --no-cache-dir --disable-pip-version-check --editable .\n```\n\n### Docker image for target application\n\n```docker\nFROM zcscompany/python:3.11-dist\n\n# Copy application requirement file\nCOPY --chown=bob:bob app/requirements.txt .\n\n# Install app requirements\nRUN pip install --user --no-cache-dir --disable-pip-version-check -r requirements.txt\n\n# Copy application code\nCOPY --chown=bob:bob app/ .\n\n# Build and install the library\nRUN python -m build \u0026\u0026 \\\n    pip install --user --no-cache-dir --disable-pip-version-check --editable .\n```\n\n## Docker hub repository\n\nhttps://hub.docker.com/r/zcscompany/python\n\n\n## Support\n\n[Claudio Cavina](mailto:c.cavina@zcscompany.com)  \n[Michele Mondelli](mailto:m.mondelli@zcscompany.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcsadmin%2Fdocker-image-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcsadmin%2Fdocker-image-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcsadmin%2Fdocker-image-python/lists"}