mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

flask-on-docker HW building image errors #424

Closed sjanefullerton closed 9 months ago

sjanefullerton commented 9 months ago

Hello,

I am working on the flask-on-docker homework and am running into errors when building the image. I am not understanding what these error messages are telling me so I am unable to troubleshoot what is going wrong.

When I run the following

lambda-server:~/flask-on-docker (main %=) $ docker-compose build

I get the following error message:

File "/home/sfullerton24/.local/lib/python2.7/site-packages/docker/credentials/store.py", line 93, in _execute
    raise errors.process_store_error(e, self.program)
docker.credentials.errors.StoreError: Credentials store docker-credential-secretservice exited with "Error from list function in secretservice_linux.c likely due to error in secretservice library".

I also tried to install docker-compose:

lambda-server:~/flask-on-docker (main *%=) $ pip3 install docker-compose

I get these errors as well:

Collecting docker-compose
  Using cached docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
Collecting PyYAML<6,>=3.10 (from docker-compose)
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/home/sfullerton24/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/sfullerton24/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/sfullerton24/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
          self.add_defaults()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 112, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "/tmp/pip-build-env-o9zhnu68/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
abizermamnoon commented 9 months ago

Hi, I had the same problem with installing docker-compose.

I think python 3.11 is not compatible with docker-compose so you have to use python 3.6.

sjanefullerton commented 9 months ago

Thank you! When I use python 3.6 to install docker-compose, I am still getting the following errors:

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-e6nnlkk_/cryptography/setup.py", line 18, in <module>
        from setuptools_rust import RustExtension
    ModuleNotFoundError: No module named 'setuptools_rust'

            =============================DEBUG ASSISTANCE==========================
            If you are seeing an error here please try the following to
            successfully install cryptography:

            Upgrade to the latest pip and try again. This will fix errors for most
            users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
            =============================DEBUG ASSISTANCE==========================

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e6nnlkk_/cryptography/
ains-arch commented 9 months ago

I think python3 -m pip install --upgrade pip solves this.

sjanefullerton commented 9 months ago

Thank you!

I am unfortunately still running into issues running docker-compose build.

Now that I have successfully upgraded pip3 and installed docker-compose, I am getting the following error:

lambda-server:~/flask-on-docker (main *%=) $ docker-compose build
/home/sfullerton24/.local/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
  from cryptography.hazmat.backends import default_backend
Building web
[+] Building 0.0s (1/1) FINISHED                                                                                                                               
 => ERROR [internal] load build definition from Dockerfile                                                                                                0.0s
------
 > [internal] load build definition from Dockerfile:
------
error: failed to solve: failed to read dockerfile: failed to prepare  as 6j4r1r6863q7xx1ifpd48ju54: symlink ../6j4r1r6863q7xx1ifpd48ju54/diff /home/sfullerton24/.local/share/docker/overlay2/l/M4D5PWBKP722SIEKNSYODYOBQU: no such file or directory
ERROR: Service 'web' failed to build : Build failed

I don't understand what the error is telling me. I have tried the troubleshooting suggestions in the other issue threads as well.