Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -3
Dockerfile
CHANGED
|
@@ -1,8 +1,16 @@
|
|
| 1 |
FROM calciumion/new-api:latest
|
| 2 |
|
| 3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
ENV PORT=7860
|
| 5 |
EXPOSE 7860
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
|
|
|
| 1 |
FROM calciumion/new-api:latest
|
| 2 |
|
| 3 |
+
# Install Python and DB drivers
|
| 4 |
+
USER root
|
| 5 |
+
RUN apt-get update && apt-get install -y python3 python3-pip
|
| 6 |
+
RUN pip3 install flask requests mysql-connector-python --break-system-packages
|
| 7 |
+
|
| 8 |
+
# Copy the shield script
|
| 9 |
+
COPY shield.py /app/shield.py
|
| 10 |
+
|
| 11 |
+
# Hugging Face port config
|
| 12 |
ENV PORT=7860
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
+
# Start Shield on 7860 and NewAPI on internal 3000
|
| 16 |
+
CMD python3 /app/shield.py & /new-api --port 3000
|