Text2Tale-NLP / Dockerfile
judy4444's picture
Update Dockerfile
da94a0c verified
Raw
History Blame Contribute Delete
732 Bytes
FROM python:3.10
USER root
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libboost-all-dev \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
RUN pip install --no-cache-dir --upgrade pip setuptools wheel pybind11
COPY --chown=user requirements.txt /app/
RUN pip install --no-cache-dir --no-binary=camel-kenlm camel-kenlm
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN camel_data -i all
COPY --chown=user . /app/
RUN python download_models.py
EXPOSE 7860
CMD ["python", "-m", "uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]