sv-task / Dockerfile
lamossta's picture
env config files
4820148
raw
history blame contribute delete
657 Bytes
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends build-essential make nginx && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
COPY requirements-cpu.txt .
COPY Makefile .
RUN make install
COPY src/ src/
COPY data/ data/
COPY pages/ pages/
COPY app.py .
COPY main.py .
COPY nginx.conf .
COPY start.sh .
RUN make preprocess && make augment
RUN chmod +x start.sh
RUN mkdir -p /tmp/nginx && \
chmod -R 777 /var/log/nginx /var/lib/nginx /tmp/nginx
RUN useradd -m -u 1000 user && \
mkdir -p /app/models && \
chown -R 1000:1000 /app/models
USER user
EXPOSE 7860
CMD ["./start.sh"]