batonogov / docker-pyinstaller Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cdrx/docker-pyinstaller
PyInstaller for Linux, Windows and OSX (Experimental) inside Docker
License: MIT License
This project forked from cdrx/docker-pyinstaller
PyInstaller for Linux, Windows and OSX (Experimental) inside Docker
License: MIT License
Hi!
I'm using your script in Gitlab CI (thanks for the job!) and I'm facing an unexpected issue.
I'm using this job definition (not so needed for what's comming)
executable:
stage: deploy
image: batonogov/pyinstaller-linux:python-3.10
variables:
SRCDIR: $CI_PROJECT_DIR
PYPI_URL: $ARTIFACTORY_PIP
PYPI_INDEX_URL: ${ARTIFACTORY_PIP}/simple
script:
- echo "running"
rules:
- when: always
Yet, the gitlab runner provides arguments to entrypoint to manage the script section (see Arguments passed via an entrypoint are going to be overridden by gitlab runner). This is a long script to search for the shell executable to be used.
Running a job with the above configuration fails as the entrypoint script uses this if-statement scripts as an entrypoint argument instead of detecting no argument. It results the entrypoint script fails.
To solve that, I needed to disable the entrypoint and run the script myself.
executable:
stage: deploy
image:
name: batonogov/pyinstaller-linux:python-3.10
entrypoint: [""]
variables:
SRCDIR: $CI_PROJECT_DIR
PYPI_URL: $ARTIFACTORY_PIP
PYPI_INDEX_URL: ${ARTIFACTORY_PIP}/simple
script:
- /bin/sh -c /entrypoint.sh
rules:
- when: always
This is a minor problem as the workaround exists and is simple (but it took me some time to understand the problem).
I can't see a simple solution. Maybe provide the pyinstaller command as an env variable? Or first run the image with no entrypoint and then use docker exec
to build the executable.
Have a nice day!
Is your feature request related to a problem? Please describe.
I have a use case where I need to install some dependencies with pip install git+...
in my Gitlab CI that uses this image. However, git is not installed (I believe a windows version of git would have to be available in order to make it to work, since I want to run pyinstaller to generate a windows executable).
Describe the solution you'd like
I have tried to install git with wine by mimicking more or less the commands available in the dockerfile, but I don't understand enough to make it work.
Thank you for this image, really appreciated. I believe that having git available would be very nice since pyinstaller requires all dependencies to be available before running (and these might come from other sources not available directly through pip install).
Hi,
first of all thank you for this image. I really appreciate that you update it so frequently.
However, I noticed that the 3.11.7 Version and all following are actually using Python version 3.11.6.
#42 seems to have only updated the readme and not the dockerfiles.
Python 3.12 uses Windows's CopyFile2()
function to implement shutil.copy2()
. (link) Unfortunately CopyFile2()
is not implemented in WINE, so any build tools that use copy2()
will break.
Extremely hacky workaround:
sed -i 's/if hasattr(_winapi, "CopyFile2"):/if False:/g' /wine/drive_c/Python3/Lib/shutil.py
Not sure if there's much can be done on this end, other than waiting for WINE to implement CopyFile2()
, but this Docker image enables such a pleasant CI that I intend to use the hacky workaround.
Nothing breaks in entrypoint-windows.sh, it's only when you have to build a wheel.
Is your feature request related to a problem? Please describe.
I would like to build my executables for linux: amd64, i386, arm32, arm64
Describe the solution you'd like
Implementation of those features into the GitHub Actions
Need test step for docker images before push on registry.
Need to implement ARM64 support for Windows.
Hi,
First of all thank you for the the fantastic work you are doing.
My builds are failing on specific dependency install (psutil):
building 'psutil._psutil_windows' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Do you think you could upgrade said tools? It feels like a legitimate requirement. Thank you again !
First thanks for this image. I really appreciate it. When I use the 3.0.1 image everything compiles just fine, but any version newer than that gives me this error:
wine: cannot get path to ntdll.so
Any ideas as to why this happens? This does not happen on 3.0.1. Using the pyinstaller-windows image.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.