FreeCAD Docker CLI mode: Difference between revisions
Renatorivo (talk | contribs) No edit summary |
m (Added {{UnfinishedDocu{{#translation:}}}}) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{UnfinishedDocu}} |
{{UnfinishedDocu{{#translation:}}}} |
||
<translate> |
<translate> |
||
<!--T:299--> |
<!--T:299--> |
||
{{Docnav |
{{Docnav |
||
|[[Compile_on_Docker|Compile on Docker]] |
|[[Compile_on_Docker|Compile on Docker]] |
||
|[[ |
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]] |
||
}} |
}} |
||
⚫ | |||
</translate> |
</translate> |
||
{{TOCright}} |
{{TOCright}} |
||
<translate> |
<translate> |
||
⚫ | |||
<!--T:309--> |
<!--T:309--> |
||
Docker image of FreeCAD compiled without GUI. This |
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=== <!--T:310--> |
===Benefits=== <!--T:310--> |
||
Line 29: | Line 30: | ||
<!--T:313--> |
<!--T:313--> |
||
* Docker Hub: https://hub.docker.com/r/amrit3701/freecad-cli |
* Docker Hub: https://hub.docker.com/r/amrit3701/freecad-cli |
||
* Github |
* Github repository: https://github.com/amrit3701/docker-freecad-cli |
||
==Prerequisites== <!--T:314--> |
==Prerequisites== <!--T:314--> |
||
Line 45: | Line 46: | ||
<!--T:317--> |
<!--T:317--> |
||
# When you successfully pulled |
# When you successfully pulled Docker image, now you can run image.</translate>{{Code|lang=bash|code= |
||
docker run -it amrit3701/freecad-cli:lastest bash |
docker run -it amrit3701/freecad-cli:lastest bash |
||
}} |
}} |
||
Line 53: | Line 54: | ||
==Additional information== <!--T:318--> |
==Additional information== <!--T:318--> |
||
===Extend |
===Extend Docker image=== <!--T:319--> |
||
<!--T:320--> |
<!--T:320--> |
||
You can also extend this |
You can also extend this Docker images to add additional dependencies for your project. For eg |
||
</translate> |
</translate> |
||
{{Code|lang=docker|code= |
{{Code|lang=docker|code= |
||
Line 66: | Line 67: | ||
# Add additional dependencies |
# Add additional dependencies |
||
# pip3. |
# pip3.8 install <some_package> |
||
}} |
}} |
||
<translate> |
<translate> |
||
Line 73: | Line 74: | ||
<!--T:322--> |
<!--T:322--> |
||
After running |
After running Docker image, just run <code>Python</code>. |
||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
$ docker run -it amrit3701/freecad-cli:lastest bash |
$ docker run -it amrit3701/freecad-cli:lastest bash |
||
root@f0ec904cf9b9:/# python3. |
root@f0ec904cf9b9:/# python3.8 |
||
Python 3. |
Python 3.8.5 (default, Jul 20 2020, 19:48:14) |
||
[GCC |
[GCC 7.5.0] on linux |
||
Type "help", "copyright", "credits" or "license" for more information. |
Type "help", "copyright", "credits" or "license" for more information. |
||
>>> import FreeCAD |
>>> import FreeCAD |
||
Line 88: | Line 89: | ||
}} |
}} |
||
<translate> |
<translate> |
||
===Launch FreeCADCmd=== |
===Launch FreeCADCmd=== <!--T:326--> |
||
<!--T:323--> |
<!--T:323--> |
||
To launch FreeCAD inside |
To launch FreeCAD inside Docker image, just run <code>FreeCADCmd</code> command. |
||
==Discussion== <!--T:324--> |
==Discussion== <!--T:324--> |
||
Line 98: | Line 100: | ||
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 |
||
<!--T:327--> |
|||
{{Docnav |
{{Docnav |
||
|[[Compile_on_Docker|Compile on Docker]] |
|[[Compile_on_Docker|Compile on Docker]] |
||
|[[ |
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]] |
||
}} |
}} |
||
</translate> |
</translate> |
Latest revision as of 19:58, 25 January 2022
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 repository: 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.8 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.8
Python 3.8.5 (default, Jul 20 2020, 19:48:14)
[GCC 7.5.0] 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