mbti / Dockerfile
asemxin2000's picture
Deploy Django MBTI test to Hugging Face Space
d2f89d7 verified
Raw
History Blame Contribute Delete
561 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
DJANGO_SETTINGS_MODULE=mbti_site.settings \
DJANGO_ALLOWED_HOSTS="*" \
PDF_FONT_PATH="/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc"
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
fonts-noto-cjk \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . .
RUN chmod +x /app/start.sh
EXPOSE 7860
CMD ["/app/start.sh"]