Spaces:
Runtime error
Runtime error
TahaRasouli
commited on
Commit
•
25c1e96
1
Parent(s):
d517f62
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
@@ -10,24 +10,24 @@ ENV PGDATA=/var/lib/postgresql/data/pgdata
|
|
10 |
# Create volume
|
11 |
VOLUME /var/lib/postgresql/data
|
12 |
|
13 |
-
# Set the working directory
|
14 |
-
WORKDIR /app
|
15 |
-
|
16 |
# Install Python and create virtual environment
|
17 |
RUN apt-get update && apt-get install -y python3 python3-venv
|
18 |
RUN python3 -m venv /venv
|
19 |
ENV PATH="/venv/bin:$PATH"
|
20 |
|
21 |
-
#
|
|
|
|
|
|
|
22 |
COPY ./requirements.txt requirements.txt
|
23 |
-
|
|
|
24 |
|
25 |
-
#
|
26 |
-
|
27 |
|
28 |
# Expose the application port
|
29 |
EXPOSE 7860
|
30 |
|
31 |
# Command to run PostgreSQL and the application
|
32 |
CMD ["sh", "-c", "postgres & uvicorn app:app --host 0.0.0.0 --port 7860"]
|
33 |
-
|
|
|
10 |
# Create volume
|
11 |
VOLUME /var/lib/postgresql/data
|
12 |
|
|
|
|
|
|
|
13 |
# Install Python and create virtual environment
|
14 |
RUN apt-get update && apt-get install -y python3 python3-venv
|
15 |
RUN python3 -m venv /venv
|
16 |
ENV PATH="/venv/bin:$PATH"
|
17 |
|
18 |
+
# Set the working directory
|
19 |
+
WORKDIR /app
|
20 |
+
|
21 |
+
# Copy the application files
|
22 |
COPY ./requirements.txt requirements.txt
|
23 |
+
COPY ./app.py app.py
|
24 |
+
COPY ./assistant.py assistant.py
|
25 |
|
26 |
+
# Install dependencies
|
27 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
28 |
|
29 |
# Expose the application port
|
30 |
EXPOSE 7860
|
31 |
|
32 |
# Command to run PostgreSQL and the application
|
33 |
CMD ["sh", "-c", "postgres & uvicorn app:app --host 0.0.0.0 --port 7860"]
|
|