| FROM python:3.10 |
|
|
| LABEL maintainer="CxGrammar Team" |
| LABEL org.opencontainers.image.source=https://github.com/cxgrammar/cxglearner |
|
|
| RUN apt-get update && apt-get install -y \ |
| git \ |
| cmake \ |
| build-essential \ |
| zlib1g-dev \ |
| libaio-dev \ |
| pkg-config \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| RUN pip install -U --no-cache-dir \ |
| cmake==4.0.3 \ |
| pybind11==2.13.6 \ |
| spacy==3.5.0 |
|
|
| COPY requirements.txt . |
|
|
| RUN pip install -r requirements.txt |
|
|
| RUN pip install -U --no-cache-dir numpy==1.24.1 |
|
|
| RUN python -m spacy download en_core_web_sm |
|
|
| RUN pip install git+https://github.com/HFAiLab/ffrecord.git |
|
|
| WORKDIR /app |
|
|
| COPY . . |
|
|
| ENV PYTHONPATH=/app |
| ENV GRADIO_SERVER_NAME=0.0.0.0 |
| ENV GRADIO_SERVER_PORT=7860 |
|
|
| EXPOSE 7860 |
|
|
| CMD ["python", "app.py"] |