Skip to content

Commit

Permalink
Moving ml docker from Pip to Poetry and updating onnx to 1.17.0 versi…
Browse files Browse the repository at this point in the history
…on (#34529)

* remove pytorch and lock

* remove Pipfile and Pipfile.lock

* requirements.txt .

* test

* test

* test

* revert

* AS

* revert to master

* split lines

* test

* test

* test

* copy from mlurlphishing

* separate the lines

* test

* revert and split

* test

* test

* test

* comment

* numpy 1.26.4

* verify.py

* test

* ~X.Y format

* Update docker/ml/pyproject.toml

Co-authored-by: dorschw <[email protected]>

* CR

* CR

* Update docker/ml/pyproject.toml

Co-authored-by: Jacob Levy <[email protected]>

* Empty-Commit

* add
nltk.download('punkt_tab', download_dir='/ml/nltk_data')

* add annotated-types to known_licenses.json

* new poetry.lock

* add attrs to the known_licenses.json

---------

Co-authored-by: dorschw <[email protected]>
Co-authored-by: Jacob Levy <[email protected]>
  • Loading branch information
3 people authored Dec 25, 2024
1 parent 3274619 commit ad3d3c6
Show file tree
Hide file tree
Showing 6 changed files with 3,306 additions and 2,308 deletions.
4 changes: 4 additions & 0 deletions docker/known_licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
"aiohappyeyeballs" : {
"license": "License :: PSF-2.0 License",
"url": "https://github.com/aio-libs/aiohappyeyeballs/blob/main/LICENSE"
},
"attrs": {
"license": "License :: MIT License",
"url": "https://github.com/python-attrs/attrs/blob/main/LICENSE"
}
}
}
27 changes: 13 additions & 14 deletions docker/ml/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,25 @@ RUN unzip /distilled_bert_base_uncased_tokenizer.zip -d /ml \
&& chmod -R 775 /ml

FROM demisto/python3-deb:3.10.14.98108
ENV HF_HOME /ml/.cache
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
ENV HF_HOME='/ml/.cache'
COPY requirements.txt .


RUN apt-get update && apt-get install -y --no-install-recommends \
gcc python3-dev pipenv gfortran wget git g++ pkg-config libhdf5-dev \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get purge -y --auto-remove \
gcc python3-dev gfortran wget git g++ pkg-config libhdf5-dev \
&& apt-get upgrade -y \
&& apt-get install -y perl libsqlite3-0

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
python3-dev pipenv gfortran wget git g++ pkg-config libhdf5-dev \
&& pipenv install --system \
&& apt-get purge -y --auto-remove gcc \
python3-dev gfortran wget git g++ pkg-config libhdf5-dev pipenv \
&& apt-get upgrade -y \
&& apt install -y perl libsqlite3-0

COPY demisto_ml-0.2.tar.gz .
RUN pip install demisto_ml-0.2.tar.gz
RUN rm -rf /var/lib/apt/lists/*
RUN python -m spacy download en_core_web_sm
RUN mkdir /ml
RUN python -c "import nltk; nltk.download('stopwords', download_dir='/ml/nltk_data'); nltk.download('punkt',download_dir='/ml/nltk_data')"
RUN mkdir -p /ml/nltk_data && chmod -R 777 /ml/nltk_data
RUN python -c "import nltk; nltk.download('punkt_tab', download_dir='/ml/nltk_data'); nltk.download('stopwords', download_dir='/ml/nltk_data'); nltk.download('punkt',download_dir='/ml/nltk_data')"
ENV NLTK_DATA='/ml/nltk_data'
ENV MPLCONFIGDIR='/ml/matplotlib'
COPY oob_evaluation.txt /ml
Expand Down
35 changes: 0 additions & 35 deletions docker/ml/Pipfile

This file was deleted.

Loading

0 comments on commit ad3d3c6

Please sign in to comment.