GithubHelp home page GithubHelp logo

armandoss / docker-octoprint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reloxx13/docker-octoprint

0.0 0.0 0.0 44 KB

Octoprint Docker Image with x86 and arm support!

License: GNU Affero General Public License v3.0

Dockerfile 25.83% Shell 74.17%

docker-octoprint's Introduction

OctoPrint Docker Image

GitHub release Build Status GitHub contributors

HitCount GitHub stars DockerHub Star GitHub forks DockerHub Pull Github all releases

GitHub license

This the Source Repo for the OctoPrint Docker Image.

Docker Hub

It supports the following architectures automatically:

  • arm32v6 (Raspberry Pi, etc.)
  • x86

Docker Tags

Tag Octoprint
latest Latest Stable
beta ReleaseCandidate
dev master

Tested devices

Device Working?
Raspberry Pi 2b
Raspberry Pi 3b+
Raspberry Pi Zero W

Usage

Witout Webcam:

docker run -d  \
  --restart=unless-stopped \
  --name=OctoPrint \
  -p 1337:80 \
  --device=/dev/ttyUSB0:/dev/ttyUSB0 \
  -v /home/pi/Docker/OctoPrint/data:/data \
  -e CAMERA_DEV_1=false \
  reloxx13/octoprint:latest 

With Webcam:

docker run -d  \
  --restart=unless-stopped \
  --name=OctoPrint \
  -p 1337:80 \
  --device=/dev/video0:/dev/video0 \
  --device=/dev/ttyUSB0:/dev/ttyUSB0 \
  -v /home/pi/Docker/OctoPrint/data:/data \
  -e STREAMER_FLAGS_1="-y -n -r 1280x720 -f 10" \
  reloxx13/octoprint:latest 

More about Webcams: Webcams known to work

Environment Variables

Variable Description Default Value CAM 1 Default Value CAM 2
CAMERA_DEV_1, CAMERA_DEV_2 The camera device node /dev/video0 /dev/video2
MJPEG_STREAMER_AUTOSTART_1, MJPEG_STREAMER_AUTOSTART_2 Start the camera automatically true false
STREAMER_FLAGS_1, STREAMER_FLAGS_2 Flags to pass to mjpg_streamer -y -n -r 640x480 -y -n -r 640x480

Webcam integration

  1. Bind the camera to the docker using --device=/dev/video0:/dev/videoX
  2. Optionally, change STREAMER_FLAGS_1 to your preferred settings (ex: -y -n -r 1280x720 -f 10)
  3. Use the following settings in octoprint:
webcam:
  stream: /webcam1/?action=stream
  snapshot: http://127.0.0.1:8080/?action=snapshot
  ffmpeg: /usr/bin/ffmpeg

Webcam Tips

v4l2-ctl --list-devices

fswebcam -v --list-controls --device /dev/video2

fswebcam -d /dev/video2 -r 640x480 test1.jpeg

lsusb

      BUS:DEVICE   

lsusb -s 001:007 -v | egrep "Width|Height"

Notes

This image uses supervisord in order to launch 3 processes: haproxy, octoprint and mjpeg-streamer.

This means you can disable/enable the camera at will from within octoprint by editing your config.yaml:

system:
  actions:
  - action: streamon
    command: supervisorctl start mjpeg-streamer
    confirm: false
    name: Start webcam
  - action: streamoff
    command: supervisorctl stop mjpeg-streamer
    confirm: false
    name: Stop webcam

Credits

Forked from https://github.com/nunofgs/docker-octoprint
Original credits go to https://bitbucket.org/a2z-team/docker-octoprint

docker-octoprint's People

Contributors

nunofgs avatar reloxx13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.