og-image-studio / Dockerfile
duqing2026's picture
init: OG 社交预览图工坊
94b7cac
raw
history blame contribute delete
350 Bytes
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY . /app
# 为 Hugging Face Spaces 创建非 root 用户
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PORT=7860
EXPOSE 7860
CMD ["python", "app.py"]