By using AWS re:Post, you agree to the Terms of Use

Learn AWS faster by following popular topics

see all
1/18

Recent questions

see all
1/18

Is it possible to compile a neuron model in my local machine?

I'm following some guides and from my understanding this should be possible. But I've been trying for hours to compile a yolov5 model into a neuron model with no success. Is it even possible to do this in my local machine or do I have to be in an inferentia instance? This is what my environment looks like: ``` # packages in environment at /miniconda3/envs/neuron: # # Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 5.1 1_gnu absl-py 1.2.0 pypi_0 pypi astor 0.8.1 pypi_0 pypi attrs 22.1.0 pypi_0 pypi backcall 0.2.0 pyhd3eb1b0_0 ca-certificates 2022.07.19 h06a4308_0 cachetools 5.2.0 pypi_0 pypi certifi 2022.9.24 pypi_0 pypi charset-normalizer 2.1.1 pypi_0 pypi cycler 0.11.0 pypi_0 pypi debugpy 1.5.1 py37h295c915_0 decorator 5.1.1 pyhd3eb1b0_0 dmlc-nnvm 1.11.1.0+0 pypi_0 pypi dmlc-topi 1.11.1.0+0 pypi_0 pypi dmlc-tvm 1.11.1.0+0 pypi_0 pypi entrypoints 0.4 py37h06a4308_0 fonttools 4.37.3 pypi_0 pypi gast 0.2.2 pypi_0 pypi google-auth 2.12.0 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi gputil 1.4.0 pypi_0 pypi grpcio 1.49.1 pypi_0 pypi h5py 3.7.0 pypi_0 pypi idna 3.4 pypi_0 pypi importlib-metadata 4.12.0 pypi_0 pypi inferentia-hwm 1.11.0.0+0 pypi_0 pypi iniconfig 1.1.1 pypi_0 pypi ipykernel 6.15.2 py37h06a4308_0 ipython 7.34.0 pypi_0 pypi ipywidgets 8.0.2 pypi_0 pypi islpy 2021.1+aws2021.x.16.0.bld0 pypi_0 pypi jedi 0.18.1 py37h06a4308_1 jupyter_client 7.3.5 py37h06a4308_0 jupyter_core 4.10.0 py37h06a4308_0 jupyterlab-widgets 3.0.3 pypi_0 pypi keras-applications 1.0.8 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi kiwisolver 1.4.4 pypi_0 pypi ld_impl_linux-64 2.38 h1181459_1 libffi 3.3 he6710b0_2 libgcc-ng 11.2.0 h1234567_1 libgomp 11.2.0 h1234567_1 libsodium 1.0.18 h7b6447c_0 libstdcxx-ng 11.2.0 h1234567_1 llvmlite 0.39.1 pypi_0 pypi markdown 3.4.1 pypi_0 pypi markupsafe 2.1.1 pypi_0 pypi matplotlib 3.5.3 pypi_0 pypi matplotlib-inline 0.1.6 py37h06a4308_0 ncurses 6.3 h5eee18b_3 nest-asyncio 1.5.5 py37h06a4308_0 networkx 2.4 pypi_0 pypi neuron-cc 1.11.7.0+aec18907e pypi_0 pypi numba 0.56.2 pypi_0 pypi numpy 1.19.5 pypi_0 pypi oauthlib 3.2.1 pypi_0 pypi opencv-python 4.6.0.66 pypi_0 pypi openssl 1.1.1q h7f8727e_0 opt-einsum 3.3.0 pypi_0 pypi packaging 21.3 pyhd3eb1b0_0 pandas 1.3.5 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.2.0 pypi_0 pypi pip 22.2.2 pypi_0 pypi pluggy 1.0.0 pypi_0 pypi prompt-toolkit 3.0.31 pypi_0 pypi protobuf 3.20.3 pypi_0 pypi psutil 5.9.2 pypi_0 pypi ptyprocess 0.7.0 pyhd3eb1b0_2 py 1.11.0 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pygments 2.13.0 pypi_0 pypi pyparsing 3.0.9 py37h06a4308_0 pytest 7.1.3 pypi_0 pypi python 3.7.13 h12debd9_0 python-dateutil 2.8.2 pyhd3eb1b0_0 pytz 2022.2.1 pypi_0 pypi pyyaml 6.0 pypi_0 pypi pyzmq 23.2.0 py37h6a678d5_0 readline 8.1.2 h7f8727e_1 requests 2.28.1 pypi_0 pypi requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi scipy 1.4.1 pypi_0 pypi seaborn 0.12.0 pypi_0 pypi setuptools 59.8.0 pypi_0 pypi six 1.16.0 pyhd3eb1b0_1 sqlite 3.39.3 h5082296_0 tensorboard 1.15.0 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.1 pypi_0 pypi tensorflow 1.15.0 pypi_0 pypi tensorflow-estimator 1.15.1 pypi_0 pypi termcolor 2.0.1 pypi_0 pypi thop 0.1.1-2209072238 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tomli 2.0.1 pypi_0 pypi torch 1.11.0 pypi_0 pypi torch-neuron 1.11.0.2.3.0.0 pypi_0 pypi torchvision 0.12.0 pypi_0 pypi tornado 6.2 py37h5eee18b_0 tqdm 4.64.1 pypi_0 pypi traitlets 5.4.0 pypi_0 pypi typing-extensions 4.3.0 pypi_0 pypi urllib3 1.26.12 pypi_0 pypi wcwidth 0.2.5 pyhd3eb1b0_0 werkzeug 2.2.2 pypi_0 pypi wheel 0.37.1 pypi_0 pypi widgetsnbextension 4.0.3 pypi_0 pypi wrapt 1.14.1 pypi_0 pypi xz 5.2.6 h5eee18b_0 zeromq 4.3.4 h2531618_0 zipp 3.8.1 pypi_0 pypi zlib 1.2.12 h5eee18b_3 ```
0
answers
0
votes
1
views
asked 18 minutes ago

Elastic Beanstalk Node Static Files are not Loaded

I am having trouble serving my static files on Elastic Beanstalk using NodeJS deployed on Linux 2. My local environment works, but my deployment is unable to serve the static files located in a top-level static folder called 'public'. My configuration is as follows: ``` option_settings: aws:elasticbeanstalk:environment:proxy:staticfiles: /images: public/images /javascripts: public/javascripts /stylesheets: public/stylesheets ``` I am certain that the configuration is processed correctly because I can view the results of the static file configuration within AWS UI. When I navigate to the home directory of my site (using http:// protocol), the HTML page is loaded, but the CSS and JS under the public directory is not. The error I get is as follows: ``` GET https://<domain name>/stylesheets/layout.css net::ERR_CONNECTION_TIMED_OUT ``` Note that the https:// protocol is used. From my understanding, the reason my local environment works is that my application serves the static files with the correct protocol. Here are my questions: 1) Why are my static files being served with protocol https:// when I request my home directory using http://? 2) I don't want to serve my static files through the application to reduce the number of requests to my application, noted here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-environmentproxystaticfiles. Is there anything actually wrong with the configuration?
0
answers
0
votes
2
views
asked 39 minutes ago
0
answers
0
votes
3
views
asked an hour ago

How to install playwright in elastic beanstalk via .ebextensions?

I need to install [Playwright](https://playwright.dev/docs/ci#introduction) in my Elastic beanstalk. So, I am using this command in `.ebextensions` `.ebextensions/01_install_playwright.config` ``` container_commands: install_playwright: command: "npx playwright install --with-deps chromium" ``` But it's getting error out. Here are the logs from cfn-init.log - ``` 2022-09-29 05:16:17,188 [INFO] -----------------------Starting build----------------------- 2022-09-29 05:16:17,194 [INFO] Running configSets: Infra-EmbeddedPostBuild 2022-09-29 05:16:17,197 [INFO] Running configSet Infra-EmbeddedPostBuild 2022-09-29 05:16:17,200 [INFO] Running config postbuild_0_test_worker 2022-09-29 05:16:18,246 [ERROR] Command install_playwright (npx playwright install --with-deps chromium) failed 2022-09-29 05:16:18,246 [ERROR] Error encountered during build of postbuild_0_test_worker: Command install_playwright failed Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config CloudFormationCarpenter(config, self._auth_config).build(worklog) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build self._config.commands) File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply raise ToolError(u"Command %s failed" % name) cfnbootstrap.construction_errors.ToolError: Command install_playwright failed 2022-09-29 05:16:18,247 [ERROR] -----------------------BUILD FAILED!------------------------ 2022-09-29 05:16:18,247 [ERROR] Unhandled exception during build: Command install_playwright failed Traceback (most recent call last): File "/opt/aws/bin/cfn-init", line 176, in <module> worklog.build(metadata, configSets) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 137, in build Contractor(metadata).build(configSets, self) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 564, in build self.run_config(config, worklog) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config CloudFormationCarpenter(config, self._auth_config).build(worklog) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build self._config.commands) File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply raise ToolError(u"Command %s failed" % name) cfnbootstrap.construction_errors.ToolError: Command install_playwright failed ``` Am I missing something or any suggestion on how to run the npx command on .ebextensions. I also [posted on SO](https://stackoverflow.com/questions/73890683/how-to-install-playwright-dependency-in-elastic-beanstalk-ebextensions) but didn't see any response. While everything is working fine on code pipeline using buildspec.yml and same command ``` phases: install: runtime-versions: nodejs: 16 #nodejs: latest pre_build: commands: - echo Installing source NPM dependencies... - npm install - echo Installing Chromium... - npx playwright install --with-deps chromium ```
0
answers
0
votes
7
views
asked 3 hours ago

Cannot create concurrent game sessions on spot instances in GameLift fleet

I'm working on getting a GameLift fleet up and running. I've been testing in GameLift Local for a while now and just recently started using GameLift proper to test the server build. I have it set to be able to handle 10 concurrent processes per instance (with ten ports specified for use), and I only have one instance running. I can connect to the instance just fine with one client, but I cannot connect with additional clients, even though I set it to allow up to ten. Checking the GameSessions tab for the Fleet in the GameLift console, I can see that only one GameSession is ever active at a time. I'm also seeing a bunch of SERVER_PROCESS_CRASHED events in the event tab that say "Server process exited without calling ProcessEnding(), exitCode(0)," and these are happening between every 5 to 10 minutes. I'm assuming the two issues are connected but I'm not sure how to fix it. I've looked for solutions but I haven't found anything that works yet. The game server is built in Unity, and there's a couple of parts of the code that I'm curious might be the issue, even though I never saw any such errors in GameLift local. First, I wonder if I'm calling Application.Quit() to quickly after calling ProcessEnding(). Right now I have them running like this: ``` var result = GameLiftServerAPI.ProcessEnding(); _networkManager.ServerManager.StopConnection(true); Application.Quit(); ``` Based on some other posts I've seen, it sounds like I need to wait until the ProcessEnding() result is true, but shouldn't it already wait to get the result in this context before calling Application.Quit()? Second, I thought it's possible that my method for setting the port might be causing an issue. I had seen a post that said it wasn't working on Linux at one point, but I tested it on a regular Linux EC2 instance in a dummy project with multiple processes running, and they were able to increment through the array of ports I set looking for unused ports. That code is like this: ``` private void SelectAvailablePort() { foreach (var port in ports) { bool available = false; available = IsListeningPortAvailable(port); if (available) { sessionPort = port; break; } } } public bool IsListeningPortAvailable(int port) => !IPGlobalProperties.GetIPGlobalProperties().GetActiveUdpListeners().Any(x => x.Port == port); ``` I'm not sure if this is breaking something on the server, since I was able to get it to work fine in the dummy project on a Linux instance, but since I cannot get past the single GameSession and I remember seeing someone saying it didn't work on Linux, it makes me wonder if it could be the issue. Do you see anything in the code above that could be causing the issue, or if not, is there something else I should try checking to see if it's the source of the problem. Again, I'm just trying to get the game to allow for multiple GameSessions per instance, but only one server process is active at a time. When I try to connect from a second client, I get an error that says there weren't any server processes available. Any advice you may have would be greatly appreciated!
0
answers
0
votes
3
views
asked 6 hours ago

bootstrap failure due to requirement of arm64 version of numpy required for r6 instances?

Was trying to upgrade to the latest r6 instances from r5s and ran into an issue with installing numpy in our bootstrap script via pip. Found[ this post](https://repost.aws/questions/QUdF4dL0k9RTeAZaUFiPDJCw/emr-bootstrap-script-with-pip-numpy-installation-fails-on-r-6-instances) that is related to my issue. Was anyone able to resolve this without building your own wheel file of the arm64 version of numpy? EC2/EMR Cluster Config ``` Release label: emr-6.5.0 Instance Type: r6gd.8xlarge ``` Snippet of the bootstrap ``` #!/bin/bash # python version pyv="$(python3 -V 2>&1)" echo "Python version: $pyv" # misc code to link up the requirements.txt echo "`date -u` install python dependencies" #Install Python deps sudo python3 -m pip install wheel sudo python3 -m pip install -r requirements.txt ``` requirements.txt ``` boto3==1.18.46 Cython==0.29.24 pandas==1.3.3 numpy==1.21.2 ``` Log Output ``` + echo 'Python version: Python 3.7.10' ... + echo 'Thu Sep 29 22:16:46 UTC 2022 install python dependencies' + sudo python3 -m pip install wheel WARNING: Running pip install with root privileges is generally not a good idea. Try `python3 -m pip install --user` instead. WARNING: The script wheel is installed in '/usr/local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. + sudo python3 -m pip install -r job-requirements.txt WARNING: Running pip install with root privileges is generally not a good idea. Try `python3 -m pip install --user` instead. ERROR: Command errored out with exit status 1: command: /bin/python3 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /mnt/tmp/pip-build-env-yy928eo_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel cwd: None Complete output (866 lines): WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead. Ignoring numpy: markers 'python_version < "3.7"' don't match your environment Collecting cython>=0.29 Using cached Cython-0.29.32-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (1.8 MB) Collecting numpy==1.16.0 Downloading numpy-1.16.0.zip (5.1 MB) Collecting setuptools Downloading setuptools-65.4.0-py3-none-any.whl (1.2 MB) Collecting setuptools_scm Downloading setuptools_scm-7.0.5-py3-none-any.whl (42 kB) Collecting wheel Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Collecting packaging>=20.0 Downloading packaging-21.3-py3-none-any.whl (40 kB) Collecting tomli>=1.0.0 Downloading tomli-2.0.1-py3-none-any.whl (12 kB) Collecting typing-extensions Downloading typing_extensions-4.3.0-py3-none-any.whl (25 kB) Collecting importlib-metadata; python_version < "3.8" Downloading importlib_metadata-4.12.0-py3-none-any.whl (21 kB) Collecting pyparsing!=3.0.5,>=2.0.2 Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB) Collecting zipp>=0.5 Downloading zipp-3.8.1-py3-none-any.whl (5.6 kB) ... _configtest.c:1:10: fatal error: Python.h: No such file or directory #include <Python.h> ^~~~~~~~~~ compilation terminated. failure. removing: _configtest.c _configtest.o Traceback (most recent call last): File "<string>", line 1, in <module> File "/mnt/tmp/pip-install-tl9eju6y/numpy/setup.py", line 415, in <module> setup_package() File "/mnt/tmp/pip-install-tl9eju6y/numpy/setup.py", line 407, in setup_package setup(**metadata) File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/core.py", line 171, in setup return old_setup(**new_attr) File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup return distutils.core.setup(**attrs) File "/usr/lib64/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib64/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/install.py", line 62, in run r = self.setuptools_run() File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/install.py", line 36, in setuptools_run return distutils_install.run(self) File "/usr/lib64/python3.7/distutils/command/install.py", line 556, in run self.run_command('build') File "/usr/lib64/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/build.py", line 47, in run old_build.run(self) File "/usr/lib64/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib64/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/build_src.py", line 148, in run self.build_sources() File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/build_src.py", line 165, in build_sources self.build_extension_sources(ext) File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/build_src.py", line 322, in build_extension_sources sources = self.generate_sources(sources, ext) File "/mnt/tmp/pip-install-tl9eju6y/numpy/numpy/distutils/command/build_src.py", line 375, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 423, in generate_config_h moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir) File "numpy/core/setup.py", line 47, in check_types out = check_types(*a, **kw) File "numpy/core/setup.py", line 281, in check_types "install {0}-dev|{0}-devel.".format(python)) SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel. ---------------------------------------- ERROR: Command errored out with exit status 1: /bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/tmp/pip-install-tl9eju6y/numpy/setup.py'"'"'; __file__='"'"'/mnt/tmp/pip-install-tl9eju6y/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /mnt/tmp/pip-record-paofd9vx/install-record.txt --single-version-externally-managed --prefix /mnt/tmp/pip-build-env-yy928eo_/overlay --compile --install-headers /mnt/tmp/pip-build-env-yy928eo_/overlay/include/python3.7m/numpy Check the logs for full command output. ---------------------------------------- ERROR: Command errored out with exit status 1: /bin/python3 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /mnt/tmp/pip-build-env-yy928eo_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel Check the logs for full command output. ```
0
answers
0
votes
3
views
asked 7 hours ago

Recent articles

see all
1/18