Saturday, August 8, 2020

Create docker image from anaconda environment

 Source:

https://haveagreatdata.com/posts/step-by-step-docker-image-for-data-science-projects/


1. Create project as follows

.
├── Dockerfile
├── environment.yml
└── src
    └── hello.py

2. Dump yml environment file

conda env export > environment.yml

3. Create Dockerfile as follows

FROM continuumio/miniconda3:4.8.2

COPY environment.yml /opt/env/
RUN conda env update -n base -f /opt/env/environment.yml \
    && conda clean -afy

4. Run Dockerfile

docker build -t stk:latest .






No comments:

Post a Comment

Loud fan of desktop

 Upon restart the fan of the desktop got loud again. I cleaned the desktop from the dust but it was still loud (Lower than the first sound) ...