Remostart commited on
Commit
ea5fa96
·
verified ·
1 Parent(s): 815b4f4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -1,7 +1,5 @@
1
-
2
  FROM python:3.10-slim
3
 
4
-
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  gcc \
7
  g++ \
@@ -11,19 +9,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
11
  libfaiss-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
-
15
  WORKDIR /app
16
 
17
-
18
  COPY requirements.txt .
19
 
20
-
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
 
24
- COPY . .
 
 
 
 
 
25
 
26
 
 
 
27
  EXPOSE 7860
28
 
29
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  gcc \
5
  g++ \
 
9
  libfaiss-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
12
  WORKDIR /app
13
 
 
14
  COPY requirements.txt .
15
 
 
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
 
19
+ RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache
20
+
21
+ ENV HF_HOME=/app/hf_cache
22
+ ENV TRANSFORMERS_CACHE=/app/hf_cache
23
+ ENV HF_DATASETS_CACHE=/app/hf_cache
24
+ ENV HF_HUB_CACHE=/app/hf_cache
25
 
26
 
27
+ COPY . .
28
+
29
  EXPOSE 7860
30
 
31
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]