Spaces:
Sleeping
Sleeping
File size: 1,249 Bytes
0ef6edc 5757aad 0ef6edc 5757aad 0ef6edc 5757aad 0ef6edc 5757aad | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.9
# ��װ����ʱ����
RUN apt-get update && apt-get install -y \
gcc g++ cmake make gnupg \
nginx \
supervisor \
curl \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# ��װ Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest
RUN useradd -m -u 1000 user
RUN chown -R user:user /var/lib/nginx/ \
&& chmod -R 755 /var/lib/nginx \
&& chown -R user:user /var/log/ \
&& chmod -R 755 /var/log \
&& chown -R user:user /run/ \
&& chmod -R 755 /run
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# ���� Nginx ����
#COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
RUN chmod +x /app/scripts/start.sh
# ��¶�˿�
EXPOSE 7860
# ��������
#CMD ["/app/scripts/start.sh"]
#CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
# ���� Supervisor
CMD ["/usr/bin/supervisord", "-n", "-c", "/app/supervisor/supervisor.conf"]
|