diff --git a/Makefile b/Makefile index 126dec6..5a98cee 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean_local install lint test doc_api doc_html clean_doc +.PHONY: clean_local build install lint test doc_api doc_html clean_doc clean_local: @find . -name "*.pyc" -type f -delete @@ -8,17 +8,20 @@ clean_local: @ruff clean @rm -rf .mypy_cache .pytest_cache build dist nxbench.egg-info htmlcov .benchmarks env +build: + @docker-compose build + install: clean_local - pip uninstall nxbench -y - pip install -e . + @pip uninstall nxbench -y + @pip install -e . lint: clean_local - isort . - ruff format . - black . + @isort . + @ruff format . + @black . test: clean_local - pytest -vvv --disable-warnings --cov=nxbench --cov-report=xml --cov-report=html --cov-report=term-missing + @pytest -vvv --disable-warnings --cov=nxbench --cov-report=xml --cov-report=html --cov-report=term-missing SPHINXOPTS = SPHINXBUILD = sphinx-build diff --git a/docker/Dockerfile b/docker/Dockerfile index 3ca9ee2..4369230 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,6 +6,10 @@ ENV CUDA_HOME=/usr/local/cuda ENV PATH=${CUDA_HOME}/bin:${PATH} ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} +WORKDIR /app + +COPY . /app/ + RUN apt-get update && apt-get install -y \ build-essential \ ca-certificates \ @@ -18,17 +22,13 @@ RUN apt-get update && apt-get install -y \ && apt-get clean \ && apt-get purge -y \ && rm -rf /var/lib/{apt,dpkg,cache,log}/ \ - && rm -rf /tmp/* /var/tmp/* - -WORKDIR /app - -COPY . /app/ - -RUN pip install --no-cache-dir -e .[cuda,scrape] \ + && rm -rf /tmp/* /var/tmp/* \ + && pip install --no-cache-dir -e .[cuda] \ nx-parallel \ python-graphblas \ ipython \ - && mkdir -p ~/.nxbench/data + && mkdir -p ~/.nxbench/data \ + && rm -rf /root/.cache/pip ENV NXBENCH_HOME=/root/.nxbench ENV NXBENCH_CONFIG_FILE=/app/configs/example.yaml @@ -38,4 +38,4 @@ CMD ["nxbench"] LABEL maintainer="Derek Alexander " LABEL description="Container image for nxbench graph algorithm benchmarking suite" LABEL version="0.1.0" -LABEL org.opencontainers.image.source="https://github.com/dpys/nxbench" \ No newline at end of file +LABEL org.opencontainers.image.source="https://github.com/dpys/nxbench" diff --git a/pyproject.toml b/pyproject.toml index 5d7b57d..7817162 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -190,6 +190,7 @@ exclude = [ ".venv", "__pypackages__", "_build", + "docker/**", "buck-out", "build", "dist",