Abid Ali Awan Codex commited on
Commit ·
72b3151
1
Parent(s): ba935c7
Validate Docker image assets
Browse filesFail Docker builds clearly when Git LFS-backed interface images have not been downloaded.
Co-authored-by: Codex <codex@openai.com>
- Dockerfile +11 -0
Dockerfile
CHANGED
|
@@ -22,6 +22,17 @@ RUN python -m pip install --upgrade pip \
|
|
| 22 |
|
| 23 |
COPY . .
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
EXPOSE 7860
|
| 26 |
|
| 27 |
CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 22 |
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
+
RUN if grep -RIl \
|
| 26 |
+
--include='*.png' \
|
| 27 |
+
--include='*.jpg' \
|
| 28 |
+
--include='*.jpeg' \
|
| 29 |
+
--include='*.gif' \
|
| 30 |
+
--include='*.webp' \
|
| 31 |
+
'version https://git-lfs.github.com/spec/v1' static | grep -q .; then \
|
| 32 |
+
echo >&2 "ERROR: Git LFS image assets are missing. Run 'git lfs pull' before building."; \
|
| 33 |
+
exit 1; \
|
| 34 |
+
fi
|
| 35 |
+
|
| 36 |
EXPOSE 7860
|
| 37 |
|
| 38 |
CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|