File size: 789 Bytes
59a0ad9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30c7349
59a0ad9
 
 
 
0162f7a
59a0ad9
 
 
 
 
 
 
 
 
 
 
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

FROM python:3.10-slim

RUN apt-get update \
 && apt-get install -y --no-install-recommends libgomp1 \
 && rm -rf /var/lib/apt/lists/*

# App workdir
WORKDIR /app

ENV HOME=/app \
    HF_HOME=/data/.hf \
    HUGGINGFACE_HUB_CACHE=/data/.hf/cache \
    TRANSFORMERS_CACHE=/data/.cache/huggingface
RUN mkdir -p /data/.hf/cache /data/.cache/huggingface \
 && chmod -R a+rw /data
# --------------------------------------------------

COPY app.py . 
COPY requirements.txt .
COPY INS.xlsx .

# Install Python deps
RUN pip install --no-cache-dir -r requirements.txt


RUN chmod -R a+rw /app

RUN touch /app/logs.log && chmod 666 /app/logs.log

# Gradio / Matplotlib envs
EXPOSE 7860
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV PYTHONUNBUFFERED=1

CMD ["python", "app.py"]