Skip to content

Commit

Permalink
cleaned up Dockerfile and test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Feb 29, 2024
1 parent a0c96ee commit 06b8c22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
include:
# Include one that runs in the dev environment
- runs-on: "ubuntu-latest"
Expand Down
24 changes: 0 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< before updating
##### build stage ##############################################################

ARG TARGET_ARCHITECTURE
Expand All @@ -7,29 +6,13 @@ ARG REGISTRY=ghcr.io/epics-containers

FROM ${REGISTRY}/epics-base-linux-developer:${BASE} AS developer
ARG PIP_OPTIONS=.
=======
# The devcontainer should use the developer target and run as root with podman
# or docker with user namespaces.
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION} as developer

# Add any system dependencies for the developer/build environment here
RUN apt-get update && apt-get install -y --no-install-recommends \
graphviz \
&& rm -rf /var/lib/apt/lists/*

# Set up a virtual environment and put it in PATH
RUN python -m venv /venv
ENV PATH=/venv/bin:$PATH
>>>>>>> after updating

# The build stage installs the context into the venv
FROM developer as build
COPY . /context
WORKDIR /context
RUN pip install .

<<<<<<< before updating
# install python package into /venv
RUN pip install ${PIP_OPTIONS}

Expand All @@ -48,12 +31,5 @@ FROM ${REGISTRY}/epics-base-linux-runtime:${BASE} AS runtime
COPY --from=runtime_prep /assets /

ENV TARGET_ARCHITECTURE linux
=======
# The runtime stage copies the built venv into a slim runtime container
FROM python:${PYTHON_VERSION}-slim as runtime
# Add apt-get system dependecies for runtime here if needed
COPY --from=build /venv/ /venv/
ENV PATH=/venv/bin:$PATH
>>>>>>> after updating

ENTRYPOINT ["/bin/bash"]
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies = [
] # Add project dependencies here, e.g. ["click", "numpy"]
dynamic = ["version"]
license.file = "LICENSE"
readme = "README.rst"
requires-python = ">=3.8"
readme = "README.md"
requires-python = ">=3.10"

[project.optional-dependencies]
dev = [
Expand Down

0 comments on commit 06b8c22

Please sign in to comment.