Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda enviroment in docker #133

Open
AmmarOkran opened this issue May 30, 2019 · 2 comments · Fixed by pkmcfarland/TSTools#5
Open

Conda enviroment in docker #133

AmmarOkran opened this issue May 30, 2019 · 2 comments · Fixed by pkmcfarland/TSTools#5

Comments

@AmmarOkran
Copy link

AmmarOkran commented May 30, 2019

I successfully have built a docker image with ContinuumIO with the following Dockerfile:

FROM continuumio/miniconda3:4.5.4

ENV FLASK_PROXY_PORT 8080

RUN apt-get update && apt-get install -y \
        gcc \
        libc-dev \
        libxslt-dev \
        libxml2-dev \
        libffi-dev \
        libssl-dev \
        zip \
        unzip \
        vim \
        && rm -rf /var/lib/apt/lists/*

RUN apt-cache search linux-headers-generic

RUN conda install -c conda-forge pdal python-pdal  gdal && conda clean --all

COPY requirements.txt requirements.txt

RUN pip install --upgrade pip setuptools six && pip install --no-cache-dir -r requirements.txt

# create action working directory

RUN mkdir -p /action

RUN mkdir -p /actionProxy

ADD https://raw.githubusercontent.com/apache/incubator-openwhisk-runtime-docker/8b2e205c39d84ed5ede6b1b08cccf314a2b13105/core/actionProxy/actionproxy.py /actionProxy/actionproxy.py

RUN mkdir -p /pythonAction

ADD https://raw.githubusercontent.com/apache/incubator-openwhisk-runtime-python/3%401.0.3/core/pythonAction/pythonrunner.py /pythonAction/pythonrunner.py

ENV PATH /opt/conda/share/proj:$PATH

CMD ["/bin/bash", "-c", "cd /pythonAction && python -u pythonrunner.py"]

However, I got some problems with apply some filters of PDAL libary with this errors:

stderr: proj_create_from_database: Open of /opt/conda/share/proj failed"

Then I tried to create an environment with conda but I couldn't activate it with docker, any suggestion? How can I create an environment and activate it with this docker file?

@GeeCastro
Copy link

GeeCastro commented Jun 5, 2019

https://fmgdata.kinja.com/using-docker-with-conda-environments-1790901398
This article (although a bit old) mentions the fact that anaconda doesnt use env in the images.
Try applying similar approach. I hope this helps

@sorenwacker
Copy link

There is no content any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants