update: look at todo

main
Thamognya Kodi 2023-01-02 08:27:27 +07:00
parent ef77a6b266
commit 4114521dec
12 changed files with 1968 additions and 2041 deletions

View File

@ -86,7 +86,6 @@ container-build:
docker build \
-t $(IMAGE):$(VERSION) . \
-f ./container/Containerfile --no-cache
# Example: make container-remove VERSION=latest
# Example: make container-remove IMAGE=some_name VERSION=0.1.0
.PHONY: container-remove

View File

@ -1,25 +0,0 @@
FROM python:3.11-slim-buster
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PATH="${PATH}:/root/.poetry/bin"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml ./
# Install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
# Allow installing dev dependencies to run tests
ARG INSTALL_DEV=false
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi"
CMD mkdir -p /workspace
WORKDIR /workspace

View File

@ -1,47 +0,0 @@
# Container / Docker for internet-ml
## Installation
To create Container / Docker you need to run:
```bash
make container-build
```
which is equivalent to:
```bash
make container-build VERSION=latest
```
You may provide name and version for the image.
Default name is `IMAGE := internet_ml`.
Default version is `VERSION := latest`.
```bash
make container-build IMAGE=some_name VERSION=0.1.0
```
## Usage
```bash
docker run -it --rm \
-v $(pwd):/workspace \
internet_ml bash
```
## How to clean up
To uninstall docker image run `make container-remove` with `VERSION`:
```bash
make container-remove VERSION=0.1.0
```
you may also choose the image name
```bash
make container-remove IMAGE=some_name VERSION=latest
```
If you want to clean all, including `build` and `pycache` run `make cleanup`

View File

View File

View File

View File

3934
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@ darglint = "^1.8.1"
isort = {extras = ["colors"], version = "^5.11.4"}
mypy = "^0.991"
mypy-extensions = "^0.4.3"
pre-commit = "^2.20.0"
pre-commit = "^2.21.0"
pydocstyle = "^6.1.1"
pylint = "^2.15.9"
pytest = "^7.2.0"