-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from epython-dev/docker-infrastructure
[WIP] Docker infrastructure
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: epython-dev | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python==3.9 | ||
- pydantic | ||
- pip | ||
- pyyaml |