Simple docker deployment following docker best practices #142
-
The current method to bundle/deploy a trame app is too involved for a simple app. Let's say I have a simple trame app as a single Python file. How would I go about building that into a docker image via a single and standard The steps of building a virtual environment outside of a container then bundling that into a new image are counter to many best practices with Docker. I understand the motivation for this process, but it is too involved for most users and most examples. How can I bundle/deploy a trame app in a more standard process with a single Dockerfile and a single I assume this would be something like: FROM kitware/trame
COPY myapp.py /deploy/myapp.py
... # Some trame command to run that script? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Ideally, I would like my base image to be |
Beta Was this translation helpful? Give feedback.
-
Could I do something like the following?: FROM python:3.9-slim
COPY myapp.py /deploy/myapp.py
RUN pip install trame
ENTRYPOINT ["python", "/deploy/myapp.py", "--server"] or do I need to do some fancy things to build the launcher and and |
Beta Was this translation helpful? Give feedback.
-
You can follow that example. The code expect your app to be named |
Beta Was this translation helpful? Give feedback.
You can follow that example.
The code expect your app to be named
app.py
and any dependency to be describe inside thesetup/requirements.txt
.