Skip to content

Update docker and fairseq #1116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0

FROM python:3.8-slim-buster
FROM python:3.12

COPY . .

RUN apt-get update && apt-get install -y --no-install-recommends build-essential libicu-dev libicu63 pkg-config && rm -rf /var/lib/apt/lists/*

RUN pip3 install --upgrade pip setuptools
RUN if [ -f docker_requirements.txt ]; then pip3 install -r docker_requirements.txt; fi
RUN pip3 install -e .[full] && pip3 cache purge
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libicu-dev python3-pip python3-venv pkg-config && rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN if [ -f docker_requirements.txt ]; then pip install -r docker_requirements.txt; fi
RUN pip install -e .[full] && pip cache purge
44 changes: 20 additions & 24 deletions docker_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
PyYAML==5.4.1
PyYAML>=5.4.1,<6.0.2
attacut==1.0.6
bpemb==0.3.6
bpemb>=0.3.6,<0.4
deepcut==0.7.0.0
emoji==0.6.0
emoji>=0.6.0,<1
epitran==1.26.0
esupar==1.3.9
fairseq==0.12.2
fastai==1.0.61
esupar>=1.3.9,<2
fairseq>=0.10.0,<0.13;python_version<"3.11"
fairseq-fixed==0.12.3.1,<0.13;python_version>="3.11"
fastai>=1.0.61,<2
fastcoref==2.1.6
gensim==4.3.3
h5py==3.13.0
khanaa==0.0.6
nlpo3==1.3.1
nltk==3.6.6
numpy==1.26.*
OSKut==1.3
pandas==2.2.*
gensim>=4.3.3,<5
khanaa>=0.1.1,<1
nlpo3>=1.3.1
nltk>=3.6.6,<4
numpy>=1.26.0,<2
pandas>=2.2.0,<3
panphon==0.21.2
phunspell==0.1.6
protobuf==5.29.3
pyicu==2.15.2
pyicu>=2.15.2,<3
python-crfsuite==0.9.11
requests==2.32.*
requests>=2.32.0,<2.33
sacremoses==0.1.1
sefr_cut==1.1
sentence-transformers==2.7.0
sentence-transformers>=2.7.0,<3
sentencepiece==0.2.0
spacy_thai==0.7.8
spacy==3.5.*
spacy==3.8.7,<4
ssg==0.0.8
symspellpy==6.9.0
tensorflow==2.18.1
thai-nner==0.3
tltk==1.6.8
torch==1.13.1
tltk>=1.6.8,<2
torch>=1.13.1,<3
transformers==4.52.3
ufal.chu-liu-edmonds==1.0.3
wtpsplit==1.3.0
wunsen==0.0.3
word2word==1.0.0
word2word>=1.0.0,<2
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
"thai2fit": ["emoji>=0.5.1", "gensim>=4.0.0", "numpy>=1.22"],
"thai2rom": ["numpy>=1.22", "torch>=1.0.0"],
"translate": [
"fairseq>=0.10.0",
'fairseq>=0.10.0,<0.13;python_version<"3.11"',
'fairseq-fixed==0.12.3.1,<0.13;python_version>="3.11"',
"sacremoses>=0.0.41",
"sentencepiece>=0.1.91",
"torch>=1.0.0",
Expand Down Expand Up @@ -117,7 +118,8 @@
"bpemb>=0.3.2",
"emoji>=0.5.1",
"epitran>=1.1",
"fairseq>=0.10.0",
'fairseq>=0.10.0,<0.13;python_version<"3.11"',
'fairseq-fixed==0.12.3.1,<0.13;python_version>="3.11"',
"fastai<2.0",
"fastcoref>=2.1.5",
"gensim>=4.0.0",
Expand Down
Loading