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

10-minute Quickstart Docker Build Failing #1133

Closed
Viditagarwal7479 opened this issue Mar 27, 2024 · 3 comments
Closed

10-minute Quickstart Docker Build Failing #1133

Viditagarwal7479 opened this issue Mar 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Viditagarwal7479
Copy link

The Step 4: Run you first example (a simple form-based task) of 10-minute Quickstart is failing.
Command:

>>> docker-compose -f docker/docker-compose.dev.yml run \
  --build \
  --publish 3001:3000 \
  --rm mephisto_dc \
  python /mephisto/examples/form_composer_demo/run_task.py

Output:

[+] Building 62.2s (15/15) FINISHED                                                                                                                                                        docker:desktop-linux
 => [mephisto_dc internal] load build definition from Dockerfile                                                                                                                                           0.0s
 => => transferring dockerfile: 1.19kB                                                                                                                                                                     0.0s
 => [mephisto_dc internal] load metadata for docker.io/nikolaik/python-nodejs:python3.9-nodejs16-slim                                                                                                      4.3s
 => [mephisto_dc internal] load .dockerignore                                                                                                                                                              0.0s
 => => transferring context: 336B                                                                                                                                                                          0.0s
 => [mephisto_dc  1/10] FROM docker.io/nikolaik/python-nodejs:python3.9-nodejs16-slim@sha256:8206caba32ced94d2d89513abdcc5e5ed3862dab5f842100914491565fb220ad                                              0.0s
 => [mephisto_dc internal] load build context                                                                                                                                                              0.1s
 => => transferring context: 143.05kB                                                                                                                                                                      0.1s
 => CACHED [mephisto_dc  2/10] RUN apt update                                                                                                                                                              0.0s
 => CACHED [mephisto_dc  3/10] RUN apt install keychain -y                                                                                                                                                 0.0s
 => [mephisto_dc  4/10] COPY . /mephisto                                                                                                                                                                   0.4s
 => [mephisto_dc  5/10] RUN mkdir ~/.mephisto                                                                                                                                                              0.2s
 => [mephisto_dc  6/10] RUN mkdir -p /mephisto/data                                                                                                                                                        0.3s
 => [mephisto_dc  7/10] RUN echo $'core: \n  main_data_directory: /mephisto/data' >> ~/.mephisto/config.yml                                                                                                0.3s
 => [mephisto_dc  8/10] RUN pip install --upgrade pip                                                                                                                                                      5.1s
 => [mephisto_dc  9/10] RUN cd /mephisto && pip install -e .                                                                                                                                              46.6s 
 => [mephisto_dc 10/10] RUN mephisto check # Run mephisto check so a mock requester gets created                                                                                                           3.9s 
 => [mephisto_dc] exporting to image                                                                                                                                                                       0.8s 
 => => exporting layers                                                                                                                                                                                    0.8s 
 => => writing image sha256:01d3ddff535b5eaf929076d4ef57cf66b9caa2fecb6f8975a0ecf0aecd2839cf                                                                                                               0.0s 
 => => naming to docker.io/library/docker-mephisto_dc                                                                                                                                                      0.0s 
Collecting pytest                                                                                                                                                                                               
  Downloading pytest-8.1.1-py3-none-any.whl.metadata (7.6 kB)
Collecting black
  Downloading black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (75 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.0/76.0 kB 2.0 MB/s eta 0:00:00
Collecting iniconfig (from pytest)
  Downloading iniconfig-2.0.0-py3-none-any.whl.metadata (2.6 kB)
Requirement already satisfied: packaging in /usr/local/lib/python3.9/site-packages (from pytest) (24.0)
Collecting pluggy<2.0,>=1.4 (from pytest)
  Downloading pluggy-1.4.0-py3-none-any.whl.metadata (4.3 kB)
Collecting exceptiongroup>=1.0.0rc8 (from pytest)
  Downloading exceptiongroup-1.2.0-py3-none-any.whl.metadata (6.6 kB)
Collecting tomli>=1 (from pytest)
  Using cached tomli-2.0.1-py3-none-any.whl.metadata (8.9 kB)
Collecting click>=8.0.0 (from black)
  Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting mypy-extensions>=0.4.3 (from black)
  Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)
Collecting pathspec>=0.9.0 (from black)
  Downloading pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
Requirement already satisfied: platformdirs>=2 in /usr/local/lib/python3.9/site-packages (from black) (3.10.0)
Requirement already satisfied: typing-extensions>=4.0.1 in /usr/local/lib/python3.9/site-packages (from black) (4.10.0)
Downloading pytest-8.1.1-py3-none-any.whl (337 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.4/337.4 kB 3.9 MB/s eta 0:00:00
Downloading black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 8.0 MB/s eta 0:00:00
Downloading click-8.1.7-py3-none-any.whl (97 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 8.2 MB/s eta 0:00:00
Downloading exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Downloading pathspec-0.12.1-py3-none-any.whl (31 kB)
Downloading pluggy-1.4.0-py3-none-any.whl (20 kB)
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Installing collected packages: tomli, pluggy, pathspec, mypy-extensions, iniconfig, exceptiongroup, click, pytest, black
  Attempting uninstall: click
    Found existing installation: Click 7.0
    Uninstalling Click-7.0:
      Successfully uninstalled Click-7.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 1.1.4 requires click<8.0,>=5.1, but you have click 8.1.7 which is incompatible.
mephisto 1.1.2 requires click==7.0, but you have click 8.1.7 which is incompatible.
Successfully installed black-24.3.0 click-8.1.7 exceptiongroup-1.2.0 iniconfig-2.0.0 mypy-extensions-1.0.0 pathspec-0.12.1 pluggy-1.4.0 pytest-8.1.1 tomli-2.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Traceback (most recent call last):
  File "/usr/local/bin/mephisto", line 5, in <module>
    from mephisto.client.cli import cli
  File "/mephisto/mephisto/client/cli.py", line 20, in <module>
    import mephisto.scripts.form_composer.rebuild_all_apps as rebuild_all_apps_form_composer
  File "/mephisto/mephisto/scripts/form_composer/rebuild_all_apps.py", line 27, in <module>
    from mephisto.generators.form_composer.config_validation.utils import set_custom_triggers_js_env_var
  File "/mephisto/mephisto/generators/form_composer/config_validation/utils.py", line 43, in <module>
    s3_client = boto3.client("s3")
  File "/usr/local/lib/python3.9/site-packages/boto3/__init__.py", line 92, in client
    return _get_default_session().client(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/boto3/session.py", line 299, in client
    return self._session.create_client(
  File "/usr/local/lib/python3.9/site-packages/botocore/session.py", line 924, in create_client
    region_name = self._resolve_region_name(region_name, config)
  File "/usr/local/lib/python3.9/site-packages/botocore/session.py", line 1023, in _resolve_region_name
    validate_region_name(region_name)
  File "/usr/local/lib/python3.9/site-packages/botocore/utils.py", line 1320, in validate_region_name
    raise InvalidRegionError(region_name=region_name)
botocore.exceptions.InvalidRegionError: Provided region_name '...' doesn't match a supported format.

git rev-parse --short HEAD  
>>> b2fcd085
meta-paul added a commit that referenced this issue Apr 5, 2024
@meta-paul
Copy link
Contributor

Hi @Viditagarwal7479 , thank you for bringing this up. It is reasonable that during Quick Launch phase you may be lacking many of the typically used credentials, and I've patched the code accordingly. Please check out latest main branch.

meta-paul added a commit that referenced this issue Apr 5, 2024
@meta-paul
Copy link
Contributor

Closing the issue as inactive, and therefore likely having been resolved.

@meta-paul meta-paul added the bug Something isn't working label Apr 11, 2024
@Viditagarwal7479
Copy link
Author

Hello @meta-paul ,
Sorry for the delayed response, I am still getting this error,

[+] Building 72.0s (15/15) FINISHED                                                                                                                                                      docker:desktop-linux
 => [mephisto_dc internal] load build definition from Dockerfile                                                                                                                                         0.0s
 => => transferring dockerfile: 1.19kB                                                                                                                                                                   0.0s
 => [mephisto_dc internal] load metadata for docker.io/nikolaik/python-nodejs:python3.9-nodejs16-slim                                                                                                    2.4s
 => [mephisto_dc internal] load .dockerignore                                                                                                                                                            0.0s
 => => transferring context: 336B                                                                                                                                                                        0.0s
 => [mephisto_dc  1/10] FROM docker.io/nikolaik/python-nodejs:python3.9-nodejs16-slim@sha256:8206caba32ced94d2d89513abdcc5e5ed3862dab5f842100914491565fb220ad                                            0.0s
 => [mephisto_dc internal] load build context                                                                                                                                                            0.9s
 => => transferring context: 1.75MB                                                                                                                                                                      0.9s
 => CACHED [mephisto_dc  2/10] RUN apt update                                                                                                                                                            0.0s
 => CACHED [mephisto_dc  3/10] RUN apt install keychain -y                                                                                                                                               0.0s
 => [mephisto_dc  4/10] COPY . /mephisto                                                                                                                                                                 0.4s
 => [mephisto_dc  5/10] RUN mkdir ~/.mephisto                                                                                                                                                            0.2s
 => [mephisto_dc  6/10] RUN mkdir -p /mephisto/data                                                                                                                                                      0.3s
 => [mephisto_dc  7/10] RUN echo $'core: \n  main_data_directory: /mephisto/data' >> ~/.mephisto/config.yml                                                                                              0.3s
 => [mephisto_dc  8/10] RUN pip install --upgrade pip                                                                                                                                                    7.1s
 => [mephisto_dc  9/10] RUN cd /mephisto && pip install -e .                                                                                                                                            55.8s 
 => [mephisto_dc 10/10] RUN mephisto check # Run mephisto check so a mock requester gets created                                                                                                         3.9s 
 => [mephisto_dc] exporting to image                                                                                                                                                                     0.6s 
 => => exporting layers                                                                                                                                                                                  0.5s 
 => => writing image sha256:8ed189a08890d650ec85e651b29f2c2ea43d8f6007880e88eb1425c3f0d0ed46                                                                                                             0.0s 
 => => naming to docker.io/library/docker-mephisto_dc                                                                                                                                                    0.0s 
Collecting pytest                                                                                                                                                                                             
  Downloading pytest-8.1.1-py3-none-any.whl.metadata (7.6 kB)
Collecting black
  Downloading black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (75 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.0/76.0 kB 2.7 MB/s eta 0:00:00
Collecting iniconfig (from pytest)
  Downloading iniconfig-2.0.0-py3-none-any.whl.metadata (2.6 kB)
Requirement already satisfied: packaging in /usr/local/lib/python3.9/site-packages (from pytest) (24.0)
Collecting pluggy<2.0,>=1.4 (from pytest)
  Downloading pluggy-1.4.0-py3-none-any.whl.metadata (4.3 kB)
Collecting exceptiongroup>=1.0.0rc8 (from pytest)
  Downloading exceptiongroup-1.2.0-py3-none-any.whl.metadata (6.6 kB)
Collecting tomli>=1 (from pytest)
  Using cached tomli-2.0.1-py3-none-any.whl.metadata (8.9 kB)
Collecting click>=8.0.0 (from black)
  Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting mypy-extensions>=0.4.3 (from black)
  Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)
Collecting pathspec>=0.9.0 (from black)
  Downloading pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
Requirement already satisfied: platformdirs>=2 in /usr/local/lib/python3.9/site-packages (from black) (3.10.0)
Requirement already satisfied: typing-extensions>=4.0.1 in /usr/local/lib/python3.9/site-packages (from black) (4.11.0)
Downloading pytest-8.1.1-py3-none-any.whl (337 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.4/337.4 kB 3.9 MB/s eta 0:00:00
Downloading black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 3.6 MB/s eta 0:00:00
Downloading click-8.1.7-py3-none-any.whl (97 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 313.2 kB/s eta 0:00:00
Downloading exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Downloading pathspec-0.12.1-py3-none-any.whl (31 kB)
Downloading pluggy-1.4.0-py3-none-any.whl (20 kB)
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Installing collected packages: tomli, pluggy, pathspec, mypy-extensions, iniconfig, exceptiongroup, click, pytest, black
  Attempting uninstall: click
    Found existing installation: click 7.1.2
    Uninstalling click-7.1.2:
      Successfully uninstalled click-7.1.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 1.1.4 requires click<8.0,>=5.1, but you have click 8.1.7 which is incompatible.
mephisto 1.1.2 requires click<8.0,>=7.0, but you have click 8.1.7 which is incompatible.
Successfully installed black-24.3.0 click-8.1.7 exceptiongroup-1.2.0 iniconfig-2.0.0 mypy-extensions-1.0.0 pathspec-0.12.1 pluggy-1.4.0 pytest-8.1.1 tomli-2.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Registered successfully.
/usr/local/lib/python3.9/site-packages/hydra/_internal/hydra.py:119: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
See https://hydra.cc/docs/1.2/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
  ret = run_job(
[2024-04-12 15:45:57,765][root][WARNING] - Mephisto supports rich run-time metrics visualization through Prometheus and Grafana. If you'd like to use this feature, use `mephisto metrics install` to install.(Current install dir is '/mephisto/mephisto/scripts/metrics')'

up to date, audited 602 packages in 3s

131 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm notice 
npm notice New major version of npm available! 8.19.4 -> 10.5.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.2
npm notice Run npm install -g npm@10.5.2 to update!
npm notice 

> mephisto-task@2.0.4 build
> NODE_ENV=production webpack --mode=production

asset build/bundle.js 81.2 KiB [compared for emit] [minimized] (name: main)
orphan modules 47.3 KiB [orphan] 5 modules
runtime modules 1.13 KiB 5 modules
built modules 163 KiB [built]
  modules by path ./node_modules/ 108 KiB
    ./node_modules/bowser/es5.js 25.4 KiB [built] [code generated]
    ./node_modules/axios/dist/browser/axios.cjs 83.1 KiB [built] [code generated]
  ./src/index.js + 5 modules 54.7 KiB [built] [code generated]
  external "react" 42 bytes [built] [code generated]
webpack 5.90.3 compiled successfully in 9826 ms

up to date, audited 555 packages in 3s

71 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> react-form-composer@1.0.0 build
> NODE_ENV=production webpack --mode=production

asset build/bundle.js 347 KiB [compared for emit] [minimized] [big] (name: main) 1 related asset
orphan modules 85.1 KiB [orphan] 20 modules
runtime modules 1.29 KiB 7 modules
built modules 1.24 MiB [built]
  modules by path ./node_modules/ 1.13 MiB
    modules by path ./node_modules/css-loader/dist/runtime/*.js 2.31 KiB
      ./node_modules/css-loader/dist/runtime/noSourceMaps.js 64 bytes [built] [code generated]
      ./node_modules/css-loader/dist/runtime/api.js 2.25 KiB [built] [code generated]
    + 6 modules
  modules by path ./src/ 114 KiB
    modules by path ./src/FormComposer/*.js 21.3 KiB 2 modules
    modules by path ./src/FormComposer/*.css 7.17 KiB 2 modules
    ./src/index.js + 20 modules 85.8 KiB [built] [code generated]
  external "react" 42 bytes [built] [code generated]

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  build/bundle.js (347 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (347 KiB)
      build/bundle.js


WARNING in webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

webpack 5.90.3 compiled with 3 warnings in 19601 ms

up to date, audited 511 packages in 2s

68 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> form_composer_demo@1.0.0 build:review
> webpack --config=webpack.config.review.js --mode development

[webpack-cli] Failed to load '/mephisto/examples/form_composer_demo/webapp/webpack.config.review.js' config
[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Object.resolve (node:path:1098:7)
    at Object.<anonymous> (/mephisto/examples/form_composer_demo/webapp/webpack.config.review.js:25:33)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18) {
  code: 'ERR_INVALID_ARG_TYPE'
}
[2024-04-12 15:46:47,121][mephisto.operations.operator][INFO] - operator shutting down
Error executing job with overrides: []
Traceback (most recent call last):
  File "/mephisto/mephisto/tools/scripts.py", line 110, in process_config_and_run_main
    raise e
  File "/mephisto/mephisto/tools/scripts.py", line 108, in process_config_and_run_main
    ret_val = script_func(operator, cfg)
  File "/mephisto/examples/form_composer_demo/run_task.py", line 19, in main
    _build_custom_bundles(cfg)
  File "/mephisto/examples/form_composer_demo/run_task.py", line 50, in _build_custom_bundles
    build_custom_bundle(
  File "/mephisto/mephisto/tools/scripts.py", line 294, in build_custom_bundle
    raise Exception(
Exception: Webpack appears to have failed to build your frontend. See the above error for more information.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants