Heroku container:push always re-installs conda packages

I’ve followed the python-miniconda tutorial offered by Heroku in order to create my own ML server on Python, which utilizes Anaconda and its packages.

Everything seems to be in order, however each time I wish to update the scripts located at /webapp by entering

  • docker-compose cannot understand my env_file
  • When I try to mount a location in my container I get a error: Invalid Flag for flag -v: bad mode specified
  • App running on docker consuming page cache of host machine.Is that anti-pattern ?
  • Connecting to Kubernetes on Docker on OSX?
  • ZMQ crashes “randomly” in aiohttp web service
  • How can I reproduce zombie process with bash as PID1 in docker?
  • heroku container:push
    

    A complete re-installation of the pip (or rather, Conda) dependencies is performed, which takes quite some time and seems illogical to me. My understanding of both Docker and Heroku frameworks is very shaky, so I haven’t been able to find a solution which allows me to push ONLY my code while leaving the container as is without (re?)uploading an entire image.

    Dockerfile:

    FROM heroku/miniconda
    
    ADD ./webapp/requirements.txt /tmp/requirements.txt
    
    RUN pip install -qr /tmp/requirements.txt
    
    ADD ./webapp /opt/webapp/ 
    WORKDIR /opt/webapp
    
    RUN conda install scikit-learn  
    RUN conda install opencv
    
    CMD gunicorn --bind 0.0.0.0:$PORT wsgi
    

  • How to take container snapshots in docker
  • Cron and Crontab files not executed in Docker
  • Any hook for Docker killed by out of memory
  • How can I get environment variables of docker in node js?
  • Can't Delete file created via Docker
  • Docker containers clustering
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.