Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # системные зависимости | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| python3-dev \ | |
| curl \ | |
| git \ | |
| swig \ | |
| wget \ | |
| unzip \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # апгрейд pip/setuptools/wheel | |
| RUN python -m pip install --upgrade pip setuptools wheel | |
| # заранее установить numpy и cython | |
| RUN python -m pip install numpy cython | |
| COPY requirements.txt . | |
| RUN python -m pip install --no-cache-dir -r requirements.txt | |
| # загрузим предобученные GloVe-вектора и распакуем | |
| RUN mkdir -p /app/models && \ | |
| cd /app/models && \ | |
| if [ ! -f glove.6B.zip ]; then \ | |
| wget -q https://nlp.stanford.edu/data/glove.6B.zip -O glove.6B.zip; \ | |
| fi && \ | |
| unzip -o glove.6B.zip && rm -f glove.6B.zip | |
| COPY . . | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |