ok-code / Dockerfile
countclaw's picture
Update Dockerfile
29c0b7d verified
raw
history blame contribute delete
858 Bytes
FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
SERVER_HOST=0.0.0.0 \
SERVER_PORT=8000 \
SERVER_WORKERS=1 \
LOG_FILE_ENABLED=false \
DATA_DIR=/app/grok2api/data \
LOG_DIR=/app/grok2api/logs
ARG SOURCE_REPO=https://github.com/CountClaw/grok2api-hf.git
ARG SOURCE_REF=main
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
WORKDIR /app
RUN git clone --depth 1 --branch ${SOURCE_REF} ${SOURCE_REPO} /app/grok2api
COPY sync_run.py /app/sync_run.py
RUN python -m pip install --upgrade pip \
&& python -m pip install -r /app/grok2api/requirements.txt huggingface_hub \
&& chown -R user:user /app
USER user
EXPOSE 8000
CMD ["python", "/app/sync_run.py"]