cryogenic22 commited on
Commit
df9f420
·
verified ·
1 Parent(s): faa7761

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -7
Dockerfile CHANGED
@@ -1,14 +1,19 @@
1
  FROM python:3.9-slim
2
- WORKDIR /code
3
 
4
- RUN mkdir -p /.cache && \
5
- chmod 777 /.cache && \
6
- mkdir -p /root/.cache/torch/sentence_transformers && \
7
- chmod -R 777 /root/.cache
8
 
9
  COPY requirements.txt .
10
- RUN pip install --no-cache-dir -r requirements.txt
11
-
12
  COPY app.py .
13
 
 
 
 
 
 
 
 
 
 
 
 
14
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9-slim
 
2
 
3
+ WORKDIR /code
 
 
 
4
 
5
  COPY requirements.txt .
 
 
6
  COPY app.py .
7
 
8
+ RUN apt-get update && \
9
+ apt-get install -y --no-install-recommends \
10
+ build-essential \
11
+ python3-dev && \
12
+ pip install --no-cache-dir -r requirements.txt && \
13
+ apt-get remove -y build-essential python3-dev && \
14
+ apt-get autoremove -y && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ EXPOSE 7860
18
+
19
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]