Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
|
@@ -24,7 +24,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 24 |
# Copy all app code
|
| 25 |
COPY . /app/
|
| 26 |
|
| 27 |
-
# Handle entrypoint
|
| 28 |
RUN if [ -f /app/scripts/entrypoint_hf.sh ]; then \
|
| 29 |
mv /app/scripts/entrypoint_hf.sh /app/scripts/entrypoint.sh; \
|
| 30 |
fi && \
|
|
@@ -35,6 +35,5 @@ RUN if [ -f /app/scripts/entrypoint_hf.sh ]; then \
|
|
| 35 |
# Hugging Face Spaces uses port 7860
|
| 36 |
EXPOSE 7860
|
| 37 |
|
| 38 |
-
# Use entrypoint
|
| 39 |
-
ENTRYPOINT ["/
|
| 40 |
-
CMD ["if [ -f /app/scripts/entrypoint.sh ]; then exec /app/scripts/entrypoint.sh; else PORT=7860 exec python main.py; fi"]
|
|
|
|
| 24 |
# Copy all app code
|
| 25 |
COPY . /app/
|
| 26 |
|
| 27 |
+
# Handle entrypoint (rename if needed, then make executable)
|
| 28 |
RUN if [ -f /app/scripts/entrypoint_hf.sh ]; then \
|
| 29 |
mv /app/scripts/entrypoint_hf.sh /app/scripts/entrypoint.sh; \
|
| 30 |
fi && \
|
|
|
|
| 35 |
# Hugging Face Spaces uses port 7860
|
| 36 |
EXPOSE 7860
|
| 37 |
|
| 38 |
+
# Use entrypoint script - this will download models and start the app
|
| 39 |
+
ENTRYPOINT ["/app/scripts/entrypoint.sh"]
|
|
|