Spaces:
Sleeping
Sleeping
- Dockerfile +2 -12
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Use the official Python image as base image
|
2 |
-
FROM python:3.
|
3 |
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
python3.10 python3-pip \
|
@@ -24,16 +24,6 @@ RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
|
24 |
# Copy the content of the local src directory to the working directory
|
25 |
COPY . .
|
26 |
|
27 |
-
# Create a user to run the application
|
28 |
-
RUN useradd -m -u 1000 user
|
29 |
-
USER user
|
30 |
-
ENV HOME=/home/user \
|
31 |
-
PATH=/home/user/.local/bin:$PATH
|
32 |
-
|
33 |
-
# Set the working directory in the user's home directory
|
34 |
-
WORKDIR $HOME/app
|
35 |
-
COPY --chown=user . $HOME/app
|
36 |
-
|
37 |
# Expose the port number on which the Flask app will run
|
38 |
EXPOSE 7860
|
39 |
|
@@ -41,4 +31,4 @@ EXPOSE 7860
|
|
41 |
ENV NAME World
|
42 |
|
43 |
# Command to run on container start
|
44 |
-
CMD [ "gunicorn", "-b", "0.0.0.0:7860", "librarymed.app_librarymed:app" ]
|
|
|
1 |
# Use the official Python image as base image
|
2 |
+
FROM python:3.10-slim
|
3 |
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
python3.10 python3-pip \
|
|
|
24 |
# Copy the content of the local src directory to the working directory
|
25 |
COPY . .
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
# Expose the port number on which the Flask app will run
|
28 |
EXPOSE 7860
|
29 |
|
|
|
31 |
ENV NAME World
|
32 |
|
33 |
# Command to run on container start
|
34 |
+
CMD [ "gunicorn", "--workers=1", "-b", "0.0.0.0:7860", "librarymed.app_librarymed:app" ]
|