# PFC300 Docker, Machine Learning Python Scripts and IEC61131-3 Integration

**URL:** <https://www.wago.community/t/pfc300-docker-machine-learning-python-scripts-and-iec61131-3-integration/1871>\
**Category:** CODESYS\
**Tags:** pfc300\
**Created:** [May 22, 2025, 12:00pm UTC](https://www.wago.community/t/pfc300-docker-machine-learning-python-scripts-and-iec61131-3-integration/1871 "2025-05-22T12:00:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prcarlospena\_2024](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@prcarlospena\_2024](https://www.wago.community/u/prcarlospena_2024)\
**Post date:** [May 22, 2025, 12:00pm UTC](https://www.wago.community/t/pfc300-docker-machine-learning-python-scripts-and-iec61131-3-integration/1871/1 "2025-05-22T12:00:10Z")

</div>

Good morning, Community.

I asked this question before but didn’t clarify my application and questions.

I got some material on installing Python in Docker and running a simple Python program to display “Hello World.” [Tech Note: Dockerizing your Python Application on a Wago Controller](https://www.wago.community/t/tech-note-dockerizing-your-python-application-on-a-wago-controller/886)

Also, I found an advanced Docker container for Python and Modbus, **but there is no documentation that explains how to use it:** [https://hub.docker.com/layers/wagoautomation/python/3.8-pysnmp-pymodbus-alpine-14/images/sha256-c174e404802d8f8c61381f06bb25d6f93060d97c650cf08c2809f24faaa7c7ff?context=explore](https://hub.docker.com/layers/wagoautomation/python/3.8-pysnmp-pymodbus-alpine-14/images/sha256-c174e404802d8f8c61381f06bb25d6f93060d97c650cf08c2809f24faaa7c7ff?context=explore)

**Here are my application details:**

I have a few Machine Learning time series transformer-trained models that use the **Numpy and PyTorch libraries** to make target predictions based on input features.  
The input features are process variables of a natural gas compressor acquired by the PFC300 via Modbus TCP/IP using the Modbus configurator in Codesys 3.5. The PFC300 acquires the real-time process variables and feeds them to the Python ML model. The ML model estimates the target value and stores the values along the input features used to calculate it in a CSV file on the PLC SD card.

**According to the Linux command “uname—m” and its manual, the PFC300 has an `aarch64` architecture, which is the 64-bit Arm-v8 instruction set, also called**  **arm64**.

**Question 1: Does the PFC300 support PyTorch and Numpy libraries?**  
\*\*Question 2: Which Linux image should I use? AI recommended to use Python:3.11-slim-bookworm due to the use of PyTorch, Pandas, and Numpy.

Thank you so much for your attention and participation.

---

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [May 22, 2025, 12:15pm UTC](https://www.wago.community/t/pfc300-docker-machine-learning-python-scripts-and-iec61131-3-integration/1871/2 "2025-05-22T12:15:50Z")

</div>

Hello,

I’m not familiar with those libraries but as a general rule the Python docker image is widely supported nevermind the architecture. I’m not sure those libraries have specific cpu requirements but since it involves machine learning it may requires GPU which is not available on the PFC300.  
I would try the slim version then maybe the standard version in case of missing dependencies.  
But the image size difference is huge : 45 Mb (slim) vs \> 3Gb (standard) .

The python image is well documented. [https://hub.docker.com/\_/python](https://hub.docker.com/_/python)  
You’ll have a to create a Dockerfile, a requirements.txt file (with name and version of libraries you need) and of course your Python script, and you will build your image.  
Once you’ve build your image you can call it using the docker run command.

---

<div class="post-metadata">

**Author:** ![joe\_a](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/joe_a/32/137_2.png) [@joe\_a](https://www.wago.community/u/joe_a)\
**Post date:** [May 22, 2025, 5:28pm UTC](https://www.wago.community/t/pfc300-docker-machine-learning-python-scripts-and-iec61131-3-integration/1871/3 "2025-05-22T17:28:45Z")

</div>

Carlos,

Here’s post I wrote a while back that may help:

> **["Running complex code on PFC300 with Codesys" | Joseph Abdelmalak posted on...](https://www.linkedin.com/posts/josephabdelmalak_pfc300-increased-capacity-loading-complex-activity-7310722267515179008-mdEd?utm_source=share&utm_medium=member_ios&rcm=ACoAACLeiR4B8aj92OK8Pnir_fFu4Uy2qCwGJ88)**
>
> PFC300: Increased capacity (Loading complex custom code while still using Codesys)
> 
> Last post, I touted the updated processing power of the PFC300 as a game changer for embedded devices. The new functionality being able to run multiple programs in...

In this application I’ve used Pandas, Numpy, and Flask all in my Python application on the PFC300.

Let me know if this helps.

Thanks,  
Joe
