-
Notifications
You must be signed in to change notification settings - Fork 171
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
context is null on AWS #76
Comments
I get the same error on desktop linux running debian with a radeon HD 8330 card. The
|
This is hard to debug. The output from the error message should be more descriptive. |
Did you start the x server? I had the same problem before that. I followed the instructions under "# Install and configure X window with virtual screen" in http://stackoverflow.com/questions/19856192/run-opengl-on-aws-gpu-instances-with-centos Though now I'm running into this issue... #65 |
I get the same traceback as @substack. If I want to use xvfb-run, is the GLX extension required? Xpra's wiki seems to suggest that Xdummy may be a better solution (https://www.xpra.org/trac/wiki/Xdummy). Has anybody tried that? |
I had the same problem when I was trying to render a model in ThreeJS using |
I had the exact same problem on my desktop PC while trying to use headless-gl. Eventually I figured out it wasn't working because the After running
it works fine. Not sure if this will help you run headless-gl on AWS, as you say you already had the |
any chance you have some barebones / template code you can share? |
@BrennerSpear Yes, absolutely!
const chromium = require('chrome-aws-lambda');
(async () => {
let browser, page;
try {
browser = await chromium.puppeteer.launch({
args: chromium.args,
defaultViewport: chromium.defaultViewport,
executablePath: await chromium.executablePath,
headless: true,
ignoreHTTPSErrors: true
});
page = await browser.newPage();
await page.setViewport({
width: 1920,
height: 1080
});
await page.goto('https://github.com/stackgl/headless-gl/issues/76');
await browser.close();
} catch (err) {
console.error(`There was an error initializing browser for Puppeteer. Error: ${err}`);
}
})(); In relation to how you can use ThreeJS, I suggest you (my setup would be quite complex to explain) to use Webpack to bundle an HTML, or bundle a React based page into an HTML in which you would upload/supply in your Lambda function. Having that local HTML in your await page.goto('/tmp/my-page.html');
// You would then call a function defined in your HTML to initialize the model that is present in your `tmp` folder
// Now you could call a function defined in your HTML using `await page.evaluate()` in which it would save a screenshot of your model and return the image data as a string
// The data returned could be saved into a PNG file in your `tmp` folder, and then saved to an S3 bucket PS: I don't have much time to detail everything at the moment, but that's the general idea. I hope it helps 😃 |
hello!
I'm trying really hard to get headless-gl to work on an AWS gpu enabled instance (EC2 gl2.2xlarge).
For the moment I'm not doing anything fancy, just the basic example but the gl context is not created, just
null
is returned.I have the latest nvidia drivers installed and am using xvfb-run.
Also, this is logged as well:
Xlib: extension "GLX" missing on display ":99".
I googled a lot for that error, set DISPLAY to equal
:99
, everything i could find, yet still nothing.Locally headless-gl works just fine, and I think it's very interesting.
Thank you very much for reading and looking forward to any responses. Send help! :)
The text was updated successfully, but these errors were encountered: