How can I install the Chrome engine in the Dify sandbox so that I can use Python code execution capabilities to perform PDF conversion? #34721
Replies: 1 comment
-
|
Unfortunately, Chrome/Chromium cannot run directly in the standard Dify sandbox due to its security architecture. The sandbox enforces chroot isolation and seccomp syscall filtering that blocks subprocess execution ( Here are your options for PDF conversion: Option 1 — External Browser API (Recommended) import requests
def main():
response = requests.post('https://chrome.browserless.io/pdf',
params={'token': 'YOUR_TOKEN'},
json={'url': 'https://example.com'})
return {'pdf': response.content}Make sure Option 2 — Custom Sandbox Image (Advanced)
A community image like Option 3 — Pure Python PDF Libraries For production use, Option 1 (external API) is the most reliable and maintainable approach. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
How can I install the Chrome engine in the Dify sandbox so that I can use Python code execution capabilities to perform PDF conversion?
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions