diff --git a/.dockerignore b/.dockerignore index c473064..95df651 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,20 +1,133 @@ -__pycache__ -*.pyc -*.pyo -*.pyd +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging .Python -env +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs pip-log.txt pip-delete-this-directory.txt -.tox + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: *.log -.git -.mypy_cache -.pytest_cache -.hypothesis +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +tracevis_data/ +.git/ +.github/ diff --git a/Dockerfile b/Dockerfile index a7cbae0..2e4168c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,18 @@ -FROM python:3.10.1-slim-bullseye +FROM python:3.10-alpine -ENV PYTHONUNBUFFERED=TRUE - -ENV TRACEVIS_OUTPUT_DIR=/tracevis_data/ - -RUN mkdir -p /tracevis_data +ENV PYTHONUNBUFFERED 1 +ENV TRACEVIS_OUTPUT_DIR /tracevis_data/ WORKDIR /tracevis # Install requirements before copying whole source. (used for quick build) COPY requirements.txt . -RUN pip install -r requirements.txt +RUN pip install --no-cache-dir -U pip && \ + pip install --no-cache-dir -r requirements.txt COPY . . ENTRYPOINT [ "python", "tracevis.py" ] -CMD [ "-h" ] \ No newline at end of file +CMD [ "-h" ] diff --git a/README.md b/README.md index 6a5a41d..043bc5b 100755 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ or with docker image: ```sh docker run \ - --mount type=bind,source=/path/to/,target=/tracevis_data/ \ + --mount type=bind,source=/path/to/results,target=/tracevis_data/ \ ghcr.io/wikicensorship/tracevis --file /tracevis_data/file.json # OR docker run \