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

Overhaul #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ htmlcov/
pkgs/
~$*.xlsx
batches/*/scans/*/*.txt
.DS_Store
*.DS_Store
.idea/
.ipynb_checkpoints/
65 changes: 65 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 4/20/2023: This Dockerfile was written for conda_build_dojo

FROM public.ecr.aws/y0o4y9o3/anaconda-pkg-build

MAINTAINER Paul Yim <[email protected]>

# Set the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

# RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

# RUN yum install -y \
# gettext gettext.i686 \
# libX11 libX11.i686 \
# libXau libXau.i686 \
# libXcb libXcb.i686 \
# libXdmcp libXdcmp.i686 \
# libXext libXext.i686 \
# libXrender libXrender.i686 \
# libXt libXt.i686 \
# mesa-libGL mesa-libGL.i686 \
# mesa-libGLU mesa-libGLU.i686 \
# libXcomposite libXcomposite.i686 \
# libXcursor libXcursor.i686 \
# libXi libXi.i686 \
# libXtst libXtst.i686 \
# libXrandr libXrandr.i686 \
# libXScrnSaver libXScrnSaver.i686 \
# alsa-lib alsa-lib.i686 \
# mesa-libEGL mesa-libEGL.i686 \
# pam pam.i686 \
# openssh-clients \
# patch \
# rsync \
# util-linux \
# wget \
# xorg-x11-server-Xvfb \
# chrpath \
# vim \
# && yum clean all

ENV CONDA_SHOW_CHANNEL_URLS 1
ENV CONDA_ADD_PIP_AS_PYTHON_DEPENDENCY 0

RUN conda update conda && \
conda install --yes git conda-build tabulate && \
conda build purge-all

# Hacky. There's gotta be a better way to get this repo onto the container so we can run `pip install -e .`
WORKDIR /conda_build_dojo
COPY ./dojo /conda_build_dojo/dojo
COPY ./lessons /conda_build_dojo/lessons
COPY ./training_feedstocks /conda_build_dojo/training_feedstocks
COPY ./curriculum.yaml /conda_build_dojo/curriculum.yaml
COPY ./env.yaml /conda_build_dojo/env.yaml
COPY ./history.csv /conda_build_dojo/history.csv
COPY ./setup.py /conda_build_dojo/setup.py

RUN cd /conda_build_dojo
RUN pip install -e .

CMD [ "/bin/bash" ]
RUN alias ll="ls -la"
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
docker build --network=host -t dojo_anaconda-pkg-build .

run:
docker run -it --mount 'src=${AGGREGATE_PATH},target=/home/,type=bind' dojo_anaconda-pkg-build
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ a hall or place for immersive learning or meditation.
## Setup
**NOTE**: Only `linux-64` and `noarch` lessons are supported at this time.

NEW STEPS
1. Build the container.
```
make build
```
1. Point to your aggregate directory.
```
export AGGREGATE_PATH=/Users/paulyim/codebase/aggregate
```
1. Run the container.
```
make run
```
1. You should now be in the container. Test that `dojo` works.
```
dojo --help
```


OLD STEPS
1. Fork this repo to your personal Github account.
2. Clone your forked repo to your local machine (e.g. your Mac), in the same directory as `aggregate`.
3. From the `conda_build_dojo` root directory, run these steps to set up your remote sources:
Expand All @@ -44,7 +64,9 @@ a hall or place for immersive learning or meditation.
Among other things, the build will install system dependencies (e.g. X11, vim), the latest Miniconda, and conda-build.
5. Run the Docker container, mounted to the local directory on your host that is the parent to `aggregate` and `conda_build_dojo`.
```
docker run -it --mount 'src=</absolute/path/to/conda_build_dojo_and_aggregate_parent>,target=/home/,type=bind' dojo_c3i_linux_64
<!-- docker run -it --rm -v `pwd`:/home public.ecr.aws/y0o4y9o3/anaconda-pkg-build /bin/bash /home/scripts/install_dojo.sh -->
docker build --network=host -t dojo_anaconda-pkg-build .
docker run -it --mount 'src=/Users/paulyim/codebase/aggregate,target=/home/,type=bind' dojo_anaconda-pkg-build

# EXAMPLE (if `aggregate` and `conda_build_dojo` share the same parent directory called `projects`):
docker run -it --mount 'src=/Users/pyim/shared/projects/,target=/home/,type=bind' dojo_c3i_linux_64
Expand Down
62 changes: 0 additions & 62 deletions docker_images/c3i-linux-64/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions docker_images/c3i-linux-64/install_dojo.sh

This file was deleted.

14 changes: 0 additions & 14 deletions docker_images/c3i-linux-64/install_miniconda.sh

This file was deleted.

12 changes: 12 additions & 0 deletions scripts/install_dojo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

alias ll="ls -la"

cd /conda_build_dojo

conda update conda -y
conda install tabulate -y

pip install -e .

echo "All set!"