Open yarikoptic opened 3 weeks ago
I think you have to do pip install psychopy --no-deps
to not install wxpython. But this means that you also have to install all other dependencies manually right?
yeah, AFAIK unfortunately there is no flexible solution ATM... we might need to look into "modularizing" dependencies in psychopy if that would be deemed feasible, but that might need to come with compromise of the default pip install psychopy
to be a "bare minimum" and then smth like psychopy[full]
providing a full installation.
I could add a --no-deps
flag to psychopy and you can choose packages manually via the implemented --additional-packages=PACKAGES
--psychopy-no-deps
flag would skip wxpython install and install psychopy with --no-deps
.
Nah, that's too fragile since list of dependencies is long there. Overall for this issue to be addressed , I need first to raise discussion with psychopy folks
#!/bin/bash
PACKAGE_NAME="psychopy"
PACKAGE_INFO=$(curl -s "https://pypi.org/pypi/$PACKAGE_NAME/json")
DEPENDENCIES=$(echo "$PACKAGE_INFO" | jq -r '.info.requires_dist[]?')
if [ -z "$DEPENDENCIES" ]; then
echo "No dependencies found for package: $PACKAGE_NAME"
else
echo "Dependencies for package $PACKAGE_NAME:"
echo "$DEPENDENCIES"
fi
This list all dependencies you can remove wxpython and use them. But it is probably better to ask psychopy folks.
Just an idea!
Quite often it is desired to use only the "experiments runner", e.g. have a smaller container just to run specific experiment. No GUIs (thus no wx) etc. For now I just built a full installation container using the script, the neurodocker invocation and produced Dockerfile and Singularity file could be found at https://github.com/ReproNim/reprostim/tree/master/containers/reprostim-timesync . I built "docker" (OCI) container using podman and it is mighty almost 4GB:
where inside using ncdu I see
export of it into singularity (didn't build natively to benefit from caching of layers while trying out etc) is smaller but still large
I guess I could still try to drastically minimize it for my specific usecase using something like reprozip, but I wondered if might be worth an option and somehow installation (didn't check if easy to do at psychopy level) without GUI elements and thus without WX?