Docker Community Forums

Share and learn in the Docker community.

Wierd Error that has ZERO google results

I’ve been trying to create a custom docker image, thats to contain a fastai deep learning project. I’ve been trying to use my anaconda environment and used the following dockerfile. However I get the same error I cannot resolve. I’m running a windows 10 machine.

docker file:

FROM continuumio/anaconda3
ADD environment.yml /tmp/environment.yml
RUN conda env create -f /tmp/environment.yml
# Pull the environment name out of the environment.yml
RUN echo "source activate $(head -1 /tmp/environment.yml | cut -d' ' -f2)" > ~/.bashrc
ENV PATH /opt/conda/envs/$(head -1 /tmp/environment.yml | cut -d' ' -f2)/bin:$PATH

I also tried this docker file:

FROM continuumio/miniconda3

WORKDIR /app

# Create the environment:
COPY environment.yml .
RUN conda env create -f environment.yml

# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "myenv", "/bin/bash", "-c"]

# Make sure the environment is activated:

# The code to run when container is started:
COPY . .
ENTRYPOINT ["conda", "run", "-n", "myenv", "python", "main.py"]

The error is as below:

failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c conda env create -f /tmp/environment.yml]: runc did not terminate sucessfully

I would really appreciate any help on this. FYI I’m new to dockers.