-
Notifications
You must be signed in to change notification settings - Fork 31
/
Dockerfile
38 lines (27 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# DOCKERFILE for Coding for Economists
# Please note that you will need a lot of RAM dedicated to Docker to build this image (15Gb+, change this in your docker settings)
# Set base image (this also loads the Alpine Linux operating system)
FROM continuumio/miniconda3:4.10.3-alpine
WORKDIR /app
# Update Linux package list and install some key libraries, including latex
RUN apk update && apk add openssl graphviz \
nano texlive alpine-sdk build-base graphviz-dev \
bash
# change default shell from ash to bash
RUN sed -i -e "s/bin\/ash/bin\/bash/" /etc/passwd
# Install mamba
RUN conda install mamba -n base -c conda-forge
# Ensure pip's setuptools is latest
RUN pip install --upgrade setuptools wheel
# Create the environment:
COPY environment.yml .
# Install everything at once:
RUN mamba env create -f environment.yml
# Do a debug or incremental env install (builds quickly):
# RUN mamba create -n python4DS -c conda-forge python=3.9 numpy pandas -y
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "py4ds2e", "/bin/bash", "-c"]
RUN mamba list
# Copy the current directory contents into the container at /app
COPY . /app
RUN echo "Success building the python4DS container!"