Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -10
Dockerfile
CHANGED
@@ -12,25 +12,24 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Set the working directory in the container
|
15 |
-
WORKDIR /code
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Install Poetry via pip
|
18 |
RUN pip install --upgrade pip \
|
19 |
&& pip install poetry
|
20 |
|
21 |
-
# Run poetry
|
22 |
-
|
23 |
-
COPY pyproject.toml poetry.lock /code/
|
24 |
-
COPY index.md /code/
|
25 |
-
|
26 |
RUN poetry install --no-root --only=main
|
27 |
|
28 |
-
|
29 |
# Expose the necessary port
|
30 |
EXPOSE 7860
|
31 |
|
32 |
# Copy the rest of your application code
|
33 |
-
COPY . /code
|
34 |
|
35 |
# Create a user and switch to it
|
36 |
RUN useradd -m -u 1000 user
|
@@ -47,5 +46,5 @@ COPY --chown=user . $HOME/app
|
|
47 |
# Add health check for the application
|
48 |
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
|
49 |
|
50 |
-
#
|
51 |
-
CMD
|
|
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Set the working directory in the container
|
15 |
+
WORKDIR /usr/bin/code
|
16 |
+
|
17 |
+
|
18 |
+
COPY ./pyproject.toml /usr/bin/code/pyproject.toml
|
19 |
+
COPY ./poetry.lock /usr/bin/code/poetry.lock
|
20 |
+
COPY ./index.md /usr/bin/code/index.md
|
21 |
|
22 |
# Install Poetry via pip
|
23 |
RUN pip install --upgrade pip \
|
24 |
&& pip install poetry
|
25 |
|
|
|
|
|
|
|
|
|
|
|
26 |
RUN poetry install --no-root --only=main
|
27 |
|
|
|
28 |
# Expose the necessary port
|
29 |
EXPOSE 7860
|
30 |
|
31 |
# Copy the rest of your application code
|
32 |
+
COPY . /usr/bin/code/
|
33 |
|
34 |
# Create a user and switch to it
|
35 |
RUN useradd -m -u 1000 user
|
|
|
46 |
# Add health check for the application
|
47 |
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
|
48 |
|
49 |
+
# Command to run your application
|
50 |
+
CMD poetry run streamlit run presidio_streamlit.py --server.port 7860 --server.address=0.0.0.0
|