Update Dockerfile and docker-compose.yaml. By default, container can use cifs to map network drives so no need to install, and added bash command to docker compose file to run both jupyterlab and dash board simultanously

This commit is contained in:
2025-04-02 14:09:44 +02:00
parent c6b010702c
commit 73648ebe31
2 changed files with 56 additions and 48 deletions

View File

@ -9,6 +9,8 @@ ENV ENV_NAME=apog_penv
# Set the working directory # Set the working directory
WORKDIR /acsmdc WORKDIR /acsmdc
#RUN apt-get update && apt-get install -y cifs-utils
# Use mamba if available for faster installation # Use mamba if available for faster installation
RUN conda install -y -n base -c conda-forge mamba && \ RUN conda install -y -n base -c conda-forge mamba && \
mamba create -y -n $ENV_NAME -c conda-forge -c defaults python=3.11 \ mamba create -y -n $ENV_NAME -c conda-forge -c defaults python=3.11 \
@ -24,6 +26,7 @@ ENV PATH=/opt/conda/envs/$ENV_NAME/bin:$PATH
# Create necessary directories for VOLUME # Create necessary directories for VOLUME
RUN mkdir -p /acsmdc/data /acsmdc/figures /acsmdc/pipelines/params RUN mkdir -p /acsmdc/data /acsmdc/figures /acsmdc/pipelines/params
#RUN mkdir -p /mnt/lac_ord
# Copy project files, excluding certain directories (handled via .dockerignore) # Copy project files, excluding certain directories (handled via .dockerignore)
COPY . /acsmdc COPY . /acsmdc
@ -43,4 +46,5 @@ RUN pip install --no-cache-dir jupyterlab
#RUN pip install --no-cache-dir matplotlib scikit-learn #RUN pip install --no-cache-dir matplotlib scikit-learn
# If you want to set JupyterLab as the default command # If you want to set JupyterLab as the default command
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token='my-token'"] #CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token='my-token'"]
CMD ["/bin/bash"]

View File

@ -1,5 +1,5 @@
services: services:
data_processor: datachain_processor:
image: datachain_processor image: datachain_processor
container_name: datachain_processor container_name: datachain_processor
restart: unless-stopped restart: unless-stopped
@ -13,7 +13,11 @@ services:
- ./figures:/acsmdc/figures - ./figures:/acsmdc/figures
- ./pipelines/params:/acsmdc/pipelines/params - ./pipelines/params:/acsmdc/pipelines/params
- lac_ord:/mnt/network/lac_ord:rw - lac_ord:/mnt/network/lac_ord:rw
command: ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token='my-token'"] command: >
bash -c "
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='my-token' &
python /acsmdc/app/data_flagging_app.py
"
volumes: volumes:
lac_ord: lac_ord: