FreeCAD Docker CLI mode/pt-br: Difference between revisions

From FreeCAD Documentation
(Created page with "FreeCAD Docker modo CLI")
 
(Updating to match new version of source page)
(6 intermediate revisions by one other user not shown)
Line 3: Line 3:


{{Docnav
{{Docnav
|[[Compile_on_Docker|Compile on Docker]]
|[[Compile_on_Docker/pt-br|Compilar no Docker]]
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]]
|[[Compiling_(Speeding_up)/pt-br|Compilação (Acelerada)]]
}}
}}


{{TOCright}}
{{TOCright}}


==Overview==
==Visão geral==


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).
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).
Line 25: Line 25:
* Github repository: https://github.com/amrit3701/docker-freecad-cli
* Github repository: https://github.com/amrit3701/docker-freecad-cli


==Prerequisites==
== Pré-requisitos ==


* 3 GB of free storage
* 3 GB of free storage
* Docker
* Docker


==Installation==
==Instalação==


# Pull the Docker image.{{Code|lang=bash|code=
# Pull the Docker image.{{Code|lang=bash|code=
docker pull amrit3701/freecad-cli:latest
docker pull amrit3701/freecad-cli:latest
}}
}}
# When you successfully pulled docker image, now you can run image.{{Code|lang=bash|code=
# When you successfully pulled Docker image, now you can run image.{{Code|lang=bash|code=
docker run -it amrit3701/freecad-cli:lastest bash
docker run -it amrit3701/freecad-cli:lastest bash
}}
}}
Line 76: Line 76:
To launch FreeCAD inside Docker image, just run <code>FreeCADCmd</code> command.
To launch FreeCAD inside Docker image, just run <code>FreeCADCmd</code> command.


==Discussion==
==Discussão==


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
Line 82: Line 82:


{{Docnav
{{Docnav
|[[Compile_on_Docker|Compile on Docker]]
|[[Compile_on_Docker/pt-br|Compilar no Docker]]
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]]
|[[Compiling_(Speeding_up)/pt-br|Compilação (Acelerada)]]
}}
}}

Revision as of 10:51, 31 October 2021

Other languages:

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.

Visão geral

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

Pré-requisitos

  • 3 GB of free storage
  • Docker

Instalação

  1. Pull the Docker image.
    docker pull amrit3701/freecad-cli:latest
    
  2. 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.

Discussão

FreeCAD forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=45877