Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
@@ -48,6 +48,11 @@ COPY --chown=hf-space:hf-space . ${HOME}/app
|
|
48 |
|
49 |
WORKDIR ${HOME}/app
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
RUN wget -O - https://kheafield.com/code/kenlm.tar.gz | tar xz && \
|
52 |
mkdir kenlm/build && \
|
53 |
cd kenlm/build && \
|
@@ -55,11 +60,9 @@ RUN wget -O - https://kheafield.com/code/kenlm.tar.gz | tar xz && \
|
|
55 |
make -j2 && \
|
56 |
cd ../..
|
57 |
|
58 |
-
|
59 |
-
|
60 |
RUN pip install --no-cache-dir -r /home/hf-space/app/requirements.txt
|
61 |
|
62 |
-
|
63 |
-
RUN pip install https://github.com/kpu/kenlm/archive/master.zip
|
64 |
|
65 |
CMD ["python", "app.py"]
|
|
|
48 |
|
49 |
WORKDIR ${HOME}/app
|
50 |
|
51 |
+
# Install KenLM module
|
52 |
+
RUN pip install --upgrade setuptools wheel
|
53 |
+
RUN pip install https://github.com/kpu/kenlm/archive/master.zip --no-build-isolation
|
54 |
+
|
55 |
+
# Install KenLM binaries
|
56 |
RUN wget -O - https://kheafield.com/code/kenlm.tar.gz | tar xz && \
|
57 |
mkdir kenlm/build && \
|
58 |
cd kenlm/build && \
|
|
|
60 |
make -j2 && \
|
61 |
cd ../..
|
62 |
|
63 |
+
# Install app dependencies
|
|
|
64 |
RUN pip install --no-cache-dir -r /home/hf-space/app/requirements.txt
|
65 |
|
66 |
+
RUN mkdir ${HF_HOME} && chmod a+rwx ${HF_HOME}
|
|
|
67 |
|
68 |
CMD ["python", "app.py"]
|