Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Dockerfile for wider compatibility. Updated readme to use docker image in one command. #1624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smit-io
Copy link

@smit-io smit-io commented Dec 21, 2024

No description provided.

@smit-io
Copy link
Author

smit-io commented Dec 21, 2024

I couldn't get the docker container to run, tried to build one using the Dockerfile but it wouldn't work.
So, I fixed some dependencies and updates readme.md to customize the fonts with a simple docker command.

@tonsky
Copy link
Owner

tonsky commented Dec 21, 2024

Just tried on fresh checkout of Fira Code -- it still works for me. What was the error you were seeing?

@smit-io
Copy link
Author

smit-io commented Dec 23, 2024

I can't get the image to build using the Dockerfile.

I figured this is because of FROM:python:3 which pulls latest python 3 image which is not compatible with some of the older libraries such as Pillow, request, urllib.

[+] Building 17.0s (7/8)                                                                                 docker:default
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 353B                                                                               0.0s
 => [internal] load metadata for docker.io/library/python:3                                                        1.9s
 => [auth] library/python:pull token for registry-1.docker.io                                                      0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [1/4] FROM docker.io/library/python:3@sha256:9255d1993f6d28b8a1cd611b108adbdfa38cb7ccc46ddde8ea7d734b6c845e32  0.0s
 => CACHED [2/4] WORKDIR /opt                                                                                      0.0s
 => ERROR [3/4] RUN pip install --upgrade Pillow==5.4.1 idna==2.8 requests==2.21.0 urllib3==1.24.1 pycairo==1.20  15.0s
------
 > [3/4] RUN pip install --upgrade Pillow==5.4.1 idna==2.8 requests==2.21.0 urllib3==1.24.1 pycairo==1.20.1 gftools==0.7.4 fontmake==2.4.0 fontbakery==0.8.0:
6.657 Collecting Pillow==5.4.1
6.945   Downloading Pillow-5.4.1.tar.gz (16.0 MB)
7.379      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.0/16.0 MB 42.8 MB/s eta 0:00:00
7.753   Installing build dependencies: started
14.46   Installing build dependencies: finished with status 'done'
14.46   Getting requirements to build wheel: started
14.61   Getting requirements to build wheel: finished with status 'error'
14.61   error: subprocess-exited-with-error
14.61
14.61   × Getting requirements to build wheel did not run successfully.
14.61   │ exit code: 1
14.61   ╰─> [24 lines of output]
14.61       Traceback (most recent call last):
14.61         File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
14.61           main()
14.61           ~~~~^^
14.61         File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
14.61           json_out['return_val'] = hook(**hook_input['kwargs'])
14.61                                    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
14.61         File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
14.61           return hook(config_settings)
14.61         File "/tmp/pip-build-env-1tc2oadc/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
14.61           return self._get_build_requires(config_settings, requirements=[])
14.61                  ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14.61         File "/tmp/pip-build-env-1tc2oadc/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
14.61           self.run_setup()
14.61           ~~~~~~~~~~~~~~^^
14.61         File "/tmp/pip-build-env-1tc2oadc/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup
14.61           super().run_setup(setup_script=setup_script)
14.61           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
14.61         File "/tmp/pip-build-env-1tc2oadc/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
14.61           exec(code, locals())
14.61           ~~~~^^^^^^^^^^^^^^^^
14.61         File "<string>", line 188, in <module>
14.61         File "<string>", line 178, in get_version
14.61       KeyError: '__version__'
14.61       [end of output]
14.61
14.61   note: This error originates from a subprocess, and is likely not a problem with pip.
14.88 error: subprocess-exited-with-error
14.88
14.88 × Getting requirements to build wheel did not run successfully.
14.88 │ exit code: 1
14.88 ╰─> See above for output.
14.88
14.88 note: This error originates from a subprocess, and is likely not a problem with pip.
------
Dockerfile:5
--------------------
   3 |     WORKDIR /opt
   4 |
   5 | >>> RUN pip install --upgrade Pillow==5.4.1 idna==2.8 requests==2.21.0 urllib3==1.24.1 pycairo==1.20.1 gftools==0.7.4 fontmake==2.4.0 fontbakery==0.8.0
   6 |     RUN apt-get update && \
   7 |         apt-get install -y ttfautohint && \
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install --upgrade Pillow==5.4.1 idna==2.8 requests==2.21.0 urllib3==1.24.1 pycairo==1.20.1 gftools==0.7.4 fontmake==2.4.0 fontbakery==0.8.0" did not complete successfully: exit code: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants