drewThomasson commited on
Commit
6fd8a32
·
verified ·
1 Parent(s): 7f8d5db

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -36,8 +36,13 @@ WORKDIR /home/user/app
36
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
37
  pip install --no-cache-dir -r requirements.txt
38
 
 
 
 
 
 
39
  # Expose the application port
40
  EXPOSE 7860
41
 
42
  # Start the Gradio app
43
- CMD ["conda", "run", "-n", "py312", "python", "app.py"]
 
36
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
37
  pip install --no-cache-dir -r requirements.txt
38
 
39
+ # Do a test run to make sure that the base models are pre-downloaded and baked into the image
40
+ RUN echo "This is a test sentence." > test.txt
41
+ RUN python app.py --headless --ebook test.txt
42
+ RUN rm test.txt
43
+
44
  # Expose the application port
45
  EXPOSE 7860
46
 
47
  # Start the Gradio app
48
+ CMD ["conda", "run", "-n", "py312", "python", "app.py"]