FROM continuumio/miniconda3 WORKDIR /workdir # Create the environment: #COPY environment.yml . COPY . . RUN conda env create -f environment.yml RUN pwd # Make RUN commands use the new environment: SHELL ["conda", "run", "-n", "somethinPredict", "/bin/bash", "-c"] RUN ls RUN conda env list # Demonstrate the environment is activated: # The code to run when container is started: #COPY run.py . ENTRYPOINT ["conda", "run","--no-capture-output", "-n", "somethinPredict", "python", "/workdir/main.py"]
标签:run,environment,miniconda,conda,file,RUN,docker,COPY From: https://www.cnblogs.com/sixiweb/p/16911213.html