| FROM python:3.10-slim-buster |
|
|
| |
| WORKDIR /app |
|
|
| |
| COPY requirements.txt requirements.txt |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| curl \ |
| build-essential \ |
| libffi-dev \ |
| cmake \ |
| libcurl4-openssl-dev \ |
| tini && \ |
| apt-get clean |
|
|
| |
| RUN python -m venv venv && \ |
| . /app/venv/bin/activate && \ |
| pip install --upgrade pip && \ |
| pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN curl https://ollama.ai/install.sh | sh |
|
|
| |
| RUN mkdir -p /.ollama && chmod 777 /.ollama |
|
|
| |
| ENV PATH="/app/venv/bin:/root/.ollama/bin:$PATH" |
|
|
| |
| EXPOSE 7860 |
| EXPOSE 11434 |
| EXPOSE 1338 |
| EXPOSE 8501 |
| |
| COPY entrypoint.sh /entrypoint.sh |
| RUN chmod +x /entrypoint.sh |
|
|
| |
| ENV model="default_model" |
|
|
| |
| COPY . . |
|
|
| |
| RUN chmod -R 777 translations |
|
|
| |
| |
| |
|
|
| |
| |
| ENTRYPOINT ["/entrypoint.sh"] |