Spaces:
Sleeping
Sleeping
ttttt
Browse files- Dockerfile +9 -21
Dockerfile
CHANGED
@@ -1,26 +1,14 @@
|
|
1 |
-
FROM python:3.10-slim
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
COPY requirements.txt .
|
6 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
7 |
|
8 |
-
|
|
|
|
|
9 |
|
10 |
-
|
11 |
-
RUN apt-get update && apt-get install -y \
|
12 |
-
build-essential \
|
13 |
-
python3-dev \
|
14 |
-
g++ \
|
15 |
-
libopenblas-dev \
|
16 |
-
libatlas-base-dev \
|
17 |
-
liblapack-dev \
|
18 |
-
libpq-dev \
|
19 |
-
curl \
|
20 |
-
git \
|
21 |
-
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
|
|
|
|
|
1 |
|
2 |
+
FROM python:3.9
|
|
|
|
|
|
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
7 |
|
8 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
11 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
12 |
|
13 |
+
COPY --chown=user . /app
|
14 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "60", "app:app"]
|