beyond-jupyter icon indicating copy to clipboard operation
beyond-jupyter copied to clipboard

add dockerfile for creating conda env

Open carbscountry opened this issue 11 months ago • 1 comments

dockerfile

FROM continuumio/miniconda3

# setting Conda Path
ENV PATH /opt/conda/bin:$PATH

COPY environment.yml .
RUN conda env create -f environment.yml

docker-compse.yml

version: '3.9'
services:
  app:
    build: .
    # dockerfile: Dockerfile
    container_name: 'beyond-jupyter'
    working_dir: '/workspace'
    volumes:
      - ./:/workspace/
    ports:
      - 8888:8888

    tty: true
    networks:
      - db_network

networks:
  db_network:
    external: true

Use conda with docker

beyond-jupyter % docker-compose up -d app
beyond-jupyter % docker-compose exec app /bash/bin
# on docker container
/workspace# source activate pop

access jyupyterlab

# on docker container
/workspace# jupyter lab --allow-root --no-browser --NotebookApp.token='' --port 8888 --ip=0.0.0.0

Access with a browser to http://localhost:8888/

carbscountry avatar Apr 03 '24 04:04 carbscountry