Update Dockerfile
Browse files- Dockerfile +6 -16
Dockerfile
CHANGED
|
@@ -1,20 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
FROM node:20-slim
|
| 3 |
|
| 4 |
-
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
-
|
| 11 |
-
RUN npm install --omit=dev
|
| 12 |
-
|
| 13 |
-
# Copy the actual server source code
|
| 14 |
-
COPY server.js ./
|
| 15 |
-
|
| 16 |
-
# Explicitly expose the Hugging Face application port
|
| 17 |
-
EXPOSE 3000
|
| 18 |
-
|
| 19 |
-
# Start the Node.js reverse proxy
|
| 20 |
-
CMD ["node", "server.js"]
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
+
COPY requirements.txt .
|
| 5 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 6 |
|
| 7 |
+
COPY main.py .
|
| 8 |
+
EXPOSE 7860
|
| 9 |
|
| 10 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|