-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 1015 Bytes
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 1015 Bytes
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
FROM pyodide/pyodide:0.20.0
# Switch shell to bash
SHELL ["/bin/bash", "-c"]
# Setup epyhton-dev
RUN mkdir -p /epython/ &&\
mkdir -p /epython/epython/
# Copy Development Files
COPY ./development/environment.yaml .
COPY ./epython/* /epython/epython/
COPY setup.py /epython/
COPY README.md /epython/
COPY tests /epyhton/
# Add Conda to PATH
ENV PATH /opt/conda/bin:$PATH
# Install Miniconda
RUN wget --quiet "https://repo.anaconda.com/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh" -O ~/miniconda.sh &&\
/bin/bash ~/miniconda.sh -q -b -p /opt/conda &&\
conda init &&\
conda env update --quiet -f ./environment.yaml &&\
echo "conda activate epython-dev" >> /root/.bashrc
ENV PATH /opt/conda/envs/epyhton-dev/bin:$PATH
SHELL ["conda", "run", "-n", "epython-dev", "/bin/bash", "-c"]
RUN cd /epython/ && pip install . &&\
cd /src/pyodide/ && pip install -e pyodide-build
ENV PYTHONPATH /src/pyodide/pyodide-build/:$PYTHONPATH
RUN cd ./pyodide/ && make
CMD ["python", "-m", "pyodide_build", "serve"]