You can set it through an ini_set within your script as shown below:
ini_set('memory_limit', 2048MB);
This can be done in the following file temporarily
app/etc/bootstrap.php
change:
#ini_set('display_errors', 1);
to:
#ini_set('display_errors', 1);
ini_set('memory_limit', 2048MB);