File size: 657 Bytes
4820148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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"]