From 091367bf9f74ee385781f2e01abd8915570d39de Mon Sep 17 00:00:00 2001 From: jlee733 <75899901+jlee733@users.noreply.github.com> Date: Fri, 20 Mar 2026 15:11:06 -0400 Subject: [PATCH] Revert "Added Dockerfile and accessing mdx2 through Docker container" --- .dockerignore | 24 -------------------- .github/Dockerfile | 34 ---------------------------- .github/workflows/docker.yml | 43 ------------------------------------ README.md | 23 +------------------ 4 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .github/Dockerfile delete mode 100644 .github/workflows/docker.yml diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 2163ae4..0000000 --- a/.dockerignore +++ /dev/null @@ -1,24 +0,0 @@ -.git -.github -.gitignore -.dockerignore -.DS_Store - -__pycache__ -*.py[cod] -*.egg-info/ -*.egg -build/ -dist/ -.eggs/ - -.env -.venv -env/ -venv/ - -.mypy_cache/ -.pytest_cache/ -.coverage -htmlcov/ -.ipynb_checkpoints diff --git a/.github/Dockerfile b/.github/Dockerfile deleted file mode 100644 index 6afa919..0000000 --- a/.github/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# diffuseproject/mdx2:1.0.0 (https://hub.docker.com/repository/docker/diffuseproject/mdx2/tags/1.0.0/sha256-abfcf7d2feacdf9a207a13c2bb908d62e6f461259f78e82d3bb8983267446291) - -FROM mambaorg/micromamba:1.5.5 AS micromamba_stage - -FROM python:3.10-slim AS final - -RUN apt-get update && apt-get install -y ca-certificates git - -COPY --from=micromamba_stage /bin/micromamba /usr/local/bin/micromamba - -ENV PATH="/usr/local/bin:/opt/conda/bin:$PATH" -ENV JUPYTER_PORT=8888 - -RUN mkdir -p /opt/conda - -WORKDIR /home/dev - -COPY env.yaml . - -# Use micromamba to create the environment and install packages -RUN /usr/local/bin/micromamba create -f env.yaml -n mdx2-dev && \ - /usr/local/bin/micromamba install -y -n mdx2-dev nexpy jupyterlab jupyterlab-h5web dials xia2 wget tar -c conda-forge && \ - /usr/local/bin/micromamba clean --all --yes - -COPY . . - -# Install dials-extensions pinned to a specific commit (963fe9e458a505a8443c988d45fb8dcb4532768f) for CHESS beamline compatibility -# Install the local package in editable mode within the environment -RUN /usr/local/bin/micromamba run -n mdx2-dev pip install git+https://github.com/FlexXBeamline/dials-extensions.git@963fe9e458a505a8443c988d45fb8dcb4532768f -RUN /usr/local/bin/micromamba run -n mdx2-dev pip install -e . - -EXPOSE 8880-8890 - -CMD /usr/local/bin/micromamba run -n mdx2-dev jupyter lab --ip=0.0.0.0 --port=$JUPYTER_PORT --no-browser --allow-root diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 9d9bcd8..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: docker - -on: - push: - branches: - - main - pull_request: - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Determine Docker tags - id: tags - run: | - if [ "${{ github.ref }}" = "refs/heads/main" ]; then - echo "tags=${{ vars.DOCKERHUB_USERNAME }}/mdx2:latest" >> $GITHUB_OUTPUT - else - echo "tags=${{ vars.DOCKERHUB_USERNAME }}/mdx2:test" >> $GITHUB_OUTPUT - fi - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - file: .github/Dockerfile - push: ${{ github.ref == 'refs/heads/main' }} - tags: ${{ steps.tags.outputs.tags }} diff --git a/README.md b/README.md index c14c7ba..1bccbae 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Publications describing [ando-lab/mdx2](https://github.com/ando-lab/mdx2): ### Prerequisites -For a conda-based installation, you'll need [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) or equivalent. The Docker-based installation requires you to install and login to [Docker](https://www.docker.com/get-started/). +For a conda-based installation, you'll need [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) or equivalent. ### User install (conda environment) @@ -71,24 +71,3 @@ pip install -e ".[dev]" ``` The last line installs mdx2 in editable mode, with optional development tools including pytest and ruff - -### Developer Install (Docker container) - -Pull image from Docker Hub and run the container. Search the Docker container logs for the localhost address to access mdx2 within a Jupyter Lab notebook or terminal. - -- Docker image exposes ports 8880-8890 (default: 8888) -- Platform: linux/amd64 -```bash -git clone https://github.com/diff-use/mdx2.git -cd mdx2 -docker pull diffuseproject/mdx2:1.0.0 -docker run --platform linux/amd64 --name mdx2_container -it -d -e JUPYTER_PORT={CONTAINER_PORT} -p {HOST_PORT}:{CONTAINER_PORT} -v "$(pwd)":/home/dev diffuseproject/mdx2:1.0.0 -docker logs mdx2_container -``` - -(Optional) Open a shell in the running container: -```bash -docker exec -it mdx2_container /bin/bash -eval "$(micromamba shell hook --shell bash)" -micromamba activate 'mdx2-dev' -``` \ No newline at end of file