| FROM python:3.11-slim |
|
|
| |
| RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/* |
|
|
| RUN useradd -m -u 1000 user |
| WORKDIR /app |
|
|
| USER root |
| |
| RUN git clone https://github.com/dou-jiang/codex-console.git . |
|
|
| |
| COPY sync_run.py /app/sync_run.py |
| RUN chown -R user:user /app && chmod +x /app/sync_run.py |
|
|
| USER user |
| ENV PATH="/home/user/.local/bin:$PATH" |
|
|
| |
| |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN pip install --no-cache-dir --force-reinstall \ |
| "fastapi==0.104.1" \ |
| "starlette==0.27.0" \ |
| "pydantic>=2.4.0" \ |
| "huggingface_hub" |
|
|
| RUN mkdir -p data logs output |
|
|
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "/app/sync_run.py"] |