FreeCAD Docker CLI mode: Difference between revisions
Renatorivo (talk | contribs) (Marked this version for translation) |
Renatorivo (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
<!--T:299--> |
<!--T:299--> |
||
{{Docnav |
{{Docnav |
||
|[[Compile_on_Docker| |
|[[Compile_on_Docker|Compile on Docker]] |
||
|[[Compiling (Speeding up)|Compiling (Speeding up)]] |
|[[Compiling (Speeding up)|Compiling (Speeding up)]] |
||
}} |
}} |
||
Line 88: | Line 88: | ||
}} |
}} |
||
<translate> |
<translate> |
||
===Launch FreeCADCmd=== |
===Launch FreeCADCmd=== |
||
<!--T:323--> |
|||
To launch FreeCAD inside docker image, just run <code>FreeCADCmd</code> command. |
To launch FreeCAD inside docker image, just run <code>FreeCADCmd</code> command. |
||
Line 95: | Line 97: | ||
<!--T:325--> |
<!--T:325--> |
||
FreeCAD forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=45877 |
FreeCAD forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=45877 |
||
{{Docnav |
|||
|[[Compile_on_Docker|Compile on Docker]] |
|||
|[[Compiling (Speeding up)|Compiling (Speeding up)]] |
|||
}} |
|||
</translate> |
</translate> |
Revision as of 22:15, 1 July 2020
This documentation is not finished. Please help and contribute documentation.
GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.
See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.
Overview
Docker image of FreeCAD compiled without GUI. This docker image is especially for developers who only want to use FreeCAD in the command-line interface (CLI).
Benefits
All of FreeCAD's dependencies are already installed, compatible with each other, and configured appropriately, allowing you to get started developing very quickly.
- Easy to use and lightweight.
- It gives better performance in terms of speed.
- No need to add FreeCAD paths to import it into Python.
Docker Repository
- Docker Hub: https://hub.docker.com/r/amrit3701/freecad-cli
- Github repo: https://github.com/amrit3701/docker-freecad-cli
Prerequisites
- 3 GB of free storage
- Docker
Installation
- Pull the Docker image.
docker pull amrit3701/freecad-cli:latest
- When you successfully pulled docker image, now you can run image.
docker run -it amrit3701/freecad-cli:lastest bash
Additional information
Extend docker image
You can also extend this docker images to add additional dependencies for your project. For eg
# Dockerfile
FROM amrit3701/freecad-cli:lastest
# Add additional dependencies
# pip3.7 install <some_package>
Import FreeCAD in Python
After running docker image, just run Python
.
$ docker run -it amrit3701/freecad-cli:lastest bash
root@f0ec904cf9b9:/# python3.7
Python 3.7.7 (default, Mar 10 2020, 17:25:08)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import FreeCAD
>>> import Part
>>> import Draft
>>> import Arch
Launch FreeCADCmd
To launch FreeCAD inside docker image, just run FreeCADCmd
command.
Discussion
FreeCAD forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=45877