Spaces:
Running
Running
petrsovadina
commited on
Commit
•
6ce577d
1
Parent(s):
a19c270
Update Dockerfile
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM python:3.
|
2 |
|
3 |
ENV PYTHONDONTWRITEBYTECODE=1
|
4 |
ENV PYTHONUNBUFFERED=1
|
@@ -9,11 +9,17 @@ COPY requirements.txt packages.txt ./
|
|
9 |
|
10 |
RUN apt-get update && \
|
11 |
xargs -a packages.txt apt-get install -y && \
|
|
|
12 |
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
|
13 |
pip install --no-cache-dir -U pip setuptools wheel && \
|
14 |
pip install --no-cache-dir -r requirements.txt && \
|
|
|
15 |
python -m spacy validate
|
16 |
|
|
|
|
|
17 |
COPY . .
|
18 |
|
19 |
EXPOSE 8501
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
|
3 |
ENV PYTHONDONTWRITEBYTECODE=1
|
4 |
ENV PYTHONUNBUFFERED=1
|
|
|
9 |
|
10 |
RUN apt-get update && \
|
11 |
xargs -a packages.txt apt-get install -y && \
|
12 |
+
apt-get install -y libgomp1 && \
|
13 |
rm -rf /var/lib/apt/lists/* && \
|
14 |
+
python -m venv /opt/venv && \
|
15 |
+
. /opt/venv/bin/activate && \
|
16 |
pip install --no-cache-dir -U pip setuptools wheel && \
|
17 |
pip install --no-cache-dir -r requirements.txt && \
|
18 |
+
python -m spacy download en_core_web_sm && \
|
19 |
python -m spacy validate
|
20 |
|
21 |
+
ENV PATH="/opt/venv/bin:$PATH"
|
22 |
+
|
23 |
COPY . .
|
24 |
|
25 |
EXPOSE 8501
|