Update Dockerfile
Browse files- Dockerfile +3 -1
Dockerfile
CHANGED
@@ -12,7 +12,7 @@ RUN mkdir -p /cache/huggingface /cache/matplotlib \
|
|
12 |
&& chmod -R 777 /cache/huggingface /cache/matplotlib
|
13 |
|
14 |
# Set environment variables for Hugging Face and Matplotlib
|
15 |
-
ENV HF_HOME=/cache/
|
16 |
ENV MPLCONFIGDIR=/cache/matplotlib
|
17 |
|
18 |
# Flask
|
@@ -21,6 +21,8 @@ ENV FLASK_APP=app.py
|
|
21 |
# Install dependencies
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
|
|
|
|
|
24 |
# Copy the rest of the app
|
25 |
COPY . .
|
26 |
|
|
|
12 |
&& chmod -R 777 /cache/huggingface /cache/matplotlib
|
13 |
|
14 |
# Set environment variables for Hugging Face and Matplotlib
|
15 |
+
ENV HF_HOME=/cache/huggingface
|
16 |
ENV MPLCONFIGDIR=/cache/matplotlib
|
17 |
|
18 |
# Flask
|
|
|
21 |
# Install dependencies
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
|
24 |
+
RUN "from transformers import AutoModelForCausalLM, AutoTokenizer; AutoModelForCausalLM.from_pretrained('gpt2-xl', cache_dir='/cache/huggingface'); AutoTokenizer.from_pretrained('gpt2-xl', cache_dir='/cache/huggingface')"
|
25 |
+
|
26 |
# Copy the rest of the app
|
27 |
COPY . .
|
28 |
|