Rodolphe Houdas 3ea25b63f9 | ||
---|---|---|
tools | ||
.dockerignore | ||
.gitignore | ||
Dockerfile | ||
README.md | ||
docker-compose.yml | ||
openscad_remote.py | ||
requirements.txt | ||
uwsgi.ini |
README.md
OpenSCAD-Remote
Send a bunch of files and get an STL out of it
🛠️ Build & Run
🐳 Docker
Using docker
is the simplest way to build, start, and host this piece of software:
# Build the image
docker build -t openscad-remote:latest .
# Start the container
docker run --rm -it -p 5000:5000 openscad-remote:latest
Alternatively, you can use docker-compose
which should simplify the above commands:
# Build the image
docker-compose build
# Start the container
docker-compose up
🐍 Python + uWSGI
Running this with pure Python and uWSGI has a few requirements:
- Flask
- Flask-Cors
- OpenSCAD
- uWSGI
OpenSCAD and uWSGI should be installed with your Linux distribution's package manager. Flask and Flask-Cors can be installed with pip
, just use the requirements.txt
file for maximum lazyness.
Once everything is installed, start the server with the following command:
uwsgi --ini uwsgi.ini
ℹ️ Usage
The below tool can be currently found online at the following URL : https://cad.interstellai.re/multi-uploader.html. However, it is not guarantee to be always up. Look at the badge above to check the status, refresh the page to refresh the status.
The service is exposed on port 5000. You can send the files through a POST
request and the server will answer with an STL file (given that it worked).
Documentation of the payload and entrypoint is coming soon...
Alternatively, you can serve the multi-uploader.html
with Python and access it from a browser:
# Go into the tools folder if not already done
cd tools
python -m http.server 8000
You can then access a neat little interface (work in progress) from your browser at http://localhost:8000/multi-uploader.html
More is coming: a better server for the UI, maybe integrate this project into a bigger one, more documentation, Matrix bot ?...