diff --git a/Docker-File.md b/Docker-File.md new file mode 100644 index 0000000..f8846ce --- /dev/null +++ b/Docker-File.md @@ -0,0 +1,32 @@ +``` +FROM ubuntu:latest + +# Install system dependencies +RUN apt-get update && \ + apt-get install -y wget git graphviz && \ + rm -rf /var/lib/apt/lists/* + +# Install Miniconda +ENV PATH="/opt/conda/bin:$PATH" +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /miniconda.sh && \ + bash /miniconda.sh -b -p /opt/conda && \ + rm /miniconda.sh + +# Set work directory +WORKDIR /app + +# Clone the repository with submodules +RUN git clone --recurse-submodules https://github.com/pablorevilla-meshtastic/meshview.git /app + +# Create conda environment +RUN conda create -n meshview python=3.11 -y + +# Activate environment and install dependencies +RUN /opt/conda/envs/meshview/bin/pip install -r /app/requirements.txt + +# Expose the web server port +EXPOSE 8081 + +# Start the application using the conda environment +CMD ["/opt/conda/envs/meshview/bin/python", "/app/main.py"] +``` \ No newline at end of file