parent
ef77a6b266
commit
4114521dec
@ -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 |
@ -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` |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue