Run picframe in a docker container? #318
Replies: 3 comments 1 reply
-
Hi @junglebells, interessting question. I never tried this with picframe. But here are some hints: Would love to get some feedback / how to. But to be honest, maybe it is much easier to install everything on your ubuntu server. But use a python virtual environment like miniconda for the python part (python version plus everything picframe need as libs). |
Beta Was this translation helpful? Give feedback.
-
When developing pi3d and picframe I worked all the time on ubuntu laptop and desktop. But, at it became "live" I tended to do everything SHH to a RPi. I've run picframe a few times since, to check things, on the laptop but not recently. More importantly I've never tried running picframe (or pi3d) in a docker container. It ought to "just work" but I can imagine potential conflicts between different applications if they are trying to access the display or OpenGL resources. To be honest, docker is something that's been on my to-do list for a long time so I really ought to try it out for my self! Paddy |
Beta Was this translation helpful? Give feedback.
-
I was curious: I set up a quick proof of concept. Using ubuntu in the docker container and connect it through unix sockets to the host xserver (on rasbian): My Dockerfile (have not tested, if some packets are redundant): FROM arm64v8/ubuntu:latest
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get -y install --no-install-recommends \
python3-pip \
libopenjp2-7 \
libgles-dev \
libatlas3-base \
libxrender-dev
RUN python3 -m pip install picframe
CMD ["python3", "-m" , "picframe.start", "/home/pi/picframe_data/config/configuration_docker.yaml"] version: "3"
services:
app:
image: picframe:latest
build: ./picframe
environment:
- DISPLAY=${DISPLAY}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /dev/dri/card0:/dev/dri/card0
- /home/pi/picframe_data:/home/pi/picframe_data
- /home/pi/Pictures:/home/pi/Pictures
network_mode: host I turned webserver and mqtt in configuration.yaml off. Important in configuration.yaml set: run: docker-compose build
docker-compose up Thats all :) Performance looks ok. But haven't done any tests. Would be interesting, how good ubuntu is. |
Beta Was this translation helpful? Give feedback.
-
I have picframe running on a Raspberry Pi - it works great and we are all in love with the display of family pictures and such.
I am planning to upgrade my Pi to a more powerful ubuntu x64 server, so it can run a few other programs. In that situation, I'd love to still run picframe, but in a docker container, so it remains unaffected by other things that are happening on the server.
Is that a possibility? I do not have much experience with creating docker files - can you help or provide some pointers?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions