Skip to content

Commit

Permalink
feat: dockerfile cleanup, Makefile expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
dPys committed Dec 4, 2024
1 parent 5ddd229 commit 485b02d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -38,4 +38,4 @@ CMD ["nxbench"]
LABEL maintainer="Derek Alexander <[email protected]>"
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"
LABEL org.opencontainers.image.source="https://github.com/dpys/nxbench"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ exclude = [
".venv",
"__pypackages__",
"_build",
"docker/**",
"buck-out",
"build",
"dist",
Expand Down

0 comments on commit 485b02d

Please sign in to comment.