Title: Unable to build version 0.8 for AWS Lambda · Issue #5927 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Unable to build version 0.8 for AWS Lambda · Issue #5927 · IfcOpenShell/IfcOpenShell
X Title: Unable to build version 0.8 for AWS Lambda · Issue #5927 · IfcOpenShell/IfcOpenShell
Description: I tried several ways to get ifcopenshell to work with AWS Lambda. For reference, I am using EFS to host my Python packages, which are later imported in my lambda function: sys.path.append('/mnt/efs') import ifcopenshell import ifcopenshe...
Open Graph Description: I tried several ways to get ifcopenshell to work with AWS Lambda. For reference, I am using EFS to host my Python packages, which are later imported in my lambda function: sys.path.append('/mnt/efs...
X Description: I tried several ways to get ifcopenshell to work with AWS Lambda. For reference, I am using EFS to host my Python packages, which are later imported in my lambda function: sys.path.append('/mnt...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/5927
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to build version 0.8 for AWS Lambda","articleBody":"I tried several ways to get ifcopenshell to work with AWS Lambda. For reference, I am using EFS to host my Python packages, which are later imported in my lambda function:\r\n\r\n```\r\nsys.path.append('/mnt/efs')\r\nimport ifcopenshell\r\nimport ifcopenshell.util\r\n```\r\n\r\nHowever, the only version that I am able to import in Lambda successfully is the one that is mentioned in the Dockerfile:\r\n\r\n`IFC_OPENSHELL_BUILD=\"39-v0.7.0-476ab50\"`\r\n\r\nThis is the updated Dockerfile that I made to get v0.8:\r\n\r\n```\r\n# Dockerfile for Running AWS Lambda Function with Python and IfcOpenShell\r\n\r\n# Base image: Python 3.9 from AWS's public container registry\r\nFROM public.ecr.aws/docker/library/python:3.12 AS build\r\n\r\n# Set the location of your Lambda function code\r\nARG FUNCTION_DIR=\"/var/task\"\r\n\r\n# Install necessary packages\r\nRUN apt-get -y update && apt-get -y install unzip wget\r\n\r\n# Install AWS Lambda runtime interface client\r\nRUN pip install --target ${FUNCTION_DIR} awslambdaric\r\n\r\n# Download and extract IfcOpenShell\r\nRUN wget https://github.com/IfcOpenShell/IfcOpenShell/releases/download/ifcopenshell-python-0.8.0/ifcopenshell-python-0.8.0-py312-linux64.zip && \\\r\n unzip ifcopenshell-python-0.8.0-py312-linux64.zip && \\\r\n mv ifcopenshell ${FUNCTION_DIR} && \\\r\n rm ifcopenshell-python-0.8.0-py312-linux64.zip\r\n\r\n# Copy the requirements file and install dependencies\r\nCOPY requirements.txt .\r\nRUN pip install -r requirements.txt\r\n\r\n# Copy the Lambda function code\r\nCOPY ./example_handler ${FUNCTION_DIR}/example_handler\r\n\r\n# Set the working directory\r\nWORKDIR ${FUNCTION_DIR}\r\n\r\n# Set the entrypoint for the Lambda function\r\nENTRYPOINT [ \"/usr/local/bin/python\", \"-m\", \"awslambdaric\" ]\r\n\r\n# Set the Python import path to the Lambda function handler\r\n# This path is relative to the root of the Lambda function code (FUNCTION_DIR)\r\n# Lambda invocation will look for this path\r\nCMD [\"example_handler.extract_wall_psets_handler\"]\r\n```\r\nBut when I copy this ifcopenshell folder to my imports, I get this error:\r\n\r\n`IfcOpenShell not built for 'linux/64bit/python3.12'`\r\n\r\nFor v0.8, I have tried many different packages, both from the official releases:\r\nhttps://docs.ifcopenshell.org/ifcopenshell-python/installation.html#zip-packages\r\n\r\nAnd also the wheels:\r\nhttps://pypi.org/project/ifcopenshell/0.8.0/#files\r\n\r\nI am not able to get it to work for any Python version. \r\n\r\nIs there something that I'm missing? How can I get v0.8 to work with my Lambda function?\r\n","author":{"url":"https://github.com/zohan638","@type":"Person","name":"zohan638"},"datePublished":"2025-01-04T00:42:55Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/5927"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:50a2ecb9-5b4f-4404-07bc-44c272f8495e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E866:2CF9FD:21B354:2C912A:6B04B4E0 |
| html-safe-nonce | 3b237f358776a1dfb5d6b28c59b176e4566e047f13b25e396bbb4615331f0e26 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODY2OjJDRjlGRDoyMUIzNTQ6MkM5MTJBOjZCMDRCNEUwIiwidmlzaXRvcl9pZCI6IjM2NTY4OTczMDk4MDUxNjM3NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3152ab6fda749cca9c3520fc373e9f60e53c33ff5d040fee043996e6998508e4 |
| hovercard-subject-tag | issue:2768329633 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/5927/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe06be276488ae4d1061e4131adca4acc439f92a8a5da2673d3f1485f0cabf55/IfcOpenShell/IfcOpenShell/issues/5927 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe06be276488ae4d1061e4131adca4acc439f92a8a5da2673d3f1485f0cabf55/IfcOpenShell/IfcOpenShell/issues/5927 |
| og:image:alt | I tried several ways to get ifcopenshell to work with AWS Lambda. For reference, I am using EFS to host my Python packages, which are later imported in my lambda function: sys.path.append('/mnt/efs... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zohan638 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b032e77f1ea437ede6c115446a0a467709b468e7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width