Spaces:
Sleeping
Sleeping
API-Handler
commited on
Update Dockerfile
Browse files- Dockerfile +15 -31
Dockerfile
CHANGED
@@ -1,31 +1,15 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
RUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/apiHandler.js
|
18 |
-
RUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/api_keys.txt
|
19 |
-
RUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/server.js
|
20 |
-
|
21 |
-
# Install dependencies
|
22 |
-
RUN npm install
|
23 |
-
|
24 |
-
# Copy the application code with correct ownership
|
25 |
-
COPY --chown=node:node . .
|
26 |
-
|
27 |
-
# Expose port 7860 (required for Hugging Face Spaces)
|
28 |
-
EXPOSE 7860
|
29 |
-
|
30 |
-
# Start the application using Node.js
|
31 |
-
CMD ["node", "server.js"]
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
+
|
9 |
+
COPY . .
|
10 |
+
|
11 |
+
RUN wget https://huggingface.co/datasets/DevsDoCode/openai/resolve/main/api_handler.py
|
12 |
+
RUN wget https://huggingface.co/datasets/DevsDoCode/openai/resolve/main/main.py
|
13 |
+
RUN wget https://huggingface.co/datasets/DevsDoCode/openai/resolve/main/models.py
|
14 |
+
|
15 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|