Forum

Author Topic: Standalone Module Use in a Docker Container  (Read 3736 times)

bbbares

  • Newbie
  • *
  • Posts: 21
    • View Profile
Standalone Module Use in a Docker Container
« on: June 03, 2020, 07:10:50 PM »
I'm looking to build my standalone scripting project into a docker image and I was wondering if anyone here has had any experience with that and if so what their Dockerfile looked like.

Related, I was wondering if there is documentation of all the libraries/drivers used by the standalone module so I don't need to go one by one in debugging while building a docker image for my project.

bvriens

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Standalone Module Use in a Docker Container
« Reply #1 on: June 26, 2020, 10:09:29 AM »
This is as far as I got. Didn't had the chance to do much testing. We are using the full metashape version in a vm for now.

FROM nvidia/cuda:10.2-base-ubuntu18.04
# Install pip for python3, mesa deb for metashape, nodejs
RUN apt update && \
    apt install -y python3-pip && \
    apt install -y wget && \
    apt install -y libglu1-mesa && \
    apt install -y libgl1-mesa-glx && \   
    rm -rf /var/lib/apt/lists/*
# add metashape user and swith to it
RUN adduser metashape
USER metashape

# set The workdir
WORKDIR /home/metashape

# install metashape python headless 1.6.3
RUN wget http://download.agisoft.com/Metashape-1.6.3-cp35.cp36.cp37-abi3-linux_x86_64.whl && \
    python3 -m pip install Metashape-1.6.3-cp35.cp36.cp37-abi3-linux_x86_64.whl && \
    rm -f Metashape-1.6.3-cp35.cp36.cp37-abi3-linux_x86_64.whl

# copy .lic to module directory pip installs in /usr/local/lib/python3.6/site-packages/Metashape
COPY YOUR_LICENSE.lic  .local/lib/python3.6/site-packages/Metashape-1.6.3.dist-info/
# expose ports for licensing
EXPOSE 5053 5147

DavidD

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Standalone Module Use in a Docker Container
« Reply #2 on: April 01, 2021, 02:27:05 PM »
Hi @bvriens and @bbbares!

I just wanted to ask if you were successful in setting up your projects and if you got everything running in the end?
I'm also interested in setting Metashape up in a docker.