Update Dockerfile
Browse files- Dockerfile +11 -2
Dockerfile
CHANGED
@@ -1,15 +1,24 @@
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
-
#
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
git \
|
6 |
gcc \
|
7 |
g++ \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
|
|
|
|
10 |
WORKDIR /app
|
11 |
|
12 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
COPY requirements.txt .
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
+
# System dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
git \
|
6 |
gcc \
|
7 |
g++ \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
+
# Create writable cache directory
|
11 |
+
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
12 |
+
|
13 |
WORKDIR /app
|
14 |
|
15 |
+
# Environment variables
|
16 |
+
ENV TRANSFORMERS_CACHE=/app/cache \
|
17 |
+
HF_HOME=/app/cache \
|
18 |
+
NUMBA_CACHE_DIR=/app/cache \
|
19 |
+
PYTHONWARNINGS="ignore" \
|
20 |
+
XDG_CACHE_HOME=/app/cache
|
21 |
+
|
22 |
COPY requirements.txt .
|
23 |
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
|