Spaces:
Sleeping
Sleeping
Create DockerFile
Browse files- DockerFile +26 -0
DockerFile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
# Install Node.js
|
4 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
|
5 |
+
RUN apt-get install -y nodejs
|
6 |
+
|
7 |
+
# Set working directory
|
8 |
+
WORKDIR /code
|
9 |
+
|
10 |
+
# Copy Python requirements file and install dependencies
|
11 |
+
COPY ./requirements.txt /code/requirements.txt
|
12 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
13 |
+
|
14 |
+
# Copy Node.js application files
|
15 |
+
COPY ./index.js /code/index.js
|
16 |
+
COPY ./package.json /code/package.json
|
17 |
+
COPY ./package-lock.json /code/package-lock.json
|
18 |
+
|
19 |
+
# Install Node.js dependencies
|
20 |
+
RUN npm install
|
21 |
+
|
22 |
+
# Copy Python application files
|
23 |
+
COPY . .
|
24 |
+
|
25 |
+
# Start both Python and Node.js applications
|
26 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860" ]
|