Commit
·
70feffe
1
Parent(s):
9cb0411
docker update
Browse files- Dockerfile +9 -1
Dockerfile
CHANGED
@@ -5,6 +5,11 @@ ENV PYTHONDONTWRITEBYTECODE=1
|
|
5 |
ENV PYTHONUNBUFFERED=1
|
6 |
ENV DEBIAN_FRONTEND=noninteractive
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
# Install system dependencies
|
9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
10 |
python3 \
|
@@ -15,6 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
15 |
&& apt-get clean \
|
16 |
&& rm -rf /var/lib/apt/lists/*
|
17 |
|
|
|
|
|
|
|
18 |
# Set the working directory
|
19 |
WORKDIR /app
|
20 |
|
@@ -29,4 +37,4 @@ RUN pip3 install --no-cache-dir -r requirements.txt
|
|
29 |
COPY app.py .
|
30 |
|
31 |
# Set the default command to run the application
|
32 |
-
CMD ["python3", "app.py"]
|
|
|
5 |
ENV PYTHONUNBUFFERED=1
|
6 |
ENV DEBIAN_FRONTEND=noninteractive
|
7 |
|
8 |
+
# Hugging Face cache locations (feel free to rename as needed)
|
9 |
+
ENV TRANSFORMERS_CACHE=/app/.cache
|
10 |
+
ENV HF_HOME=/app/.cache
|
11 |
+
ENV HF_HUB_CACHE=/app/.cache
|
12 |
+
|
13 |
# Install system dependencies
|
14 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
15 |
python3 \
|
|
|
20 |
&& apt-get clean \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
23 |
+
# Create the cache directory and fix permissions
|
24 |
+
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
25 |
+
|
26 |
# Set the working directory
|
27 |
WORKDIR /app
|
28 |
|
|
|
37 |
COPY app.py .
|
38 |
|
39 |
# Set the default command to run the application
|
40 |
+
CMD ["python3", "app.py"]
|