Spaces:
Sleeping
Sleeping
datnguyentien204
commited on
Commit
•
25c1d3a
1
Parent(s):
ce91ea1
Update Dockerfile
Browse files- Dockerfile +23 -26
Dockerfile
CHANGED
@@ -1,26 +1,23 @@
|
|
1 |
-
FROM python:3.10.13-alpine
|
2 |
-
|
3 |
-
# Add dependencies for streamlit
|
4 |
-
RUN apk add --no-cache gcc g++ libstdc++ bash
|
5 |
-
|
6 |
-
# Create a user and switch to it
|
7 |
-
RUN useradd -m -u 1000 user
|
8 |
-
USER user
|
9 |
-
|
10 |
-
WORKDIR /app
|
11 |
-
|
12 |
-
# Copy requirements and install them
|
13 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
14 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
-
|
16 |
-
# Install additional dependencies
|
17 |
-
RUN pip install git+https://github.com/tatsy/torchmcubes.git
|
18 |
-
|
19 |
-
#
|
20 |
-
|
21 |
-
|
22 |
-
#
|
23 |
-
|
24 |
-
|
25 |
-
# Command to run the Streamlit app
|
26 |
-
CMD ["streamlit", "run", "app.py", "--server.headless", "true", "--server.enableCORS", "false", "--server.port", "7860", "--server.address", "0.0.0.0"]
|
|
|
1 |
+
FROM python:3.10.13-alpine
|
2 |
+
|
3 |
+
# Add dependencies for streamlit
|
4 |
+
RUN apk add --no-cache gcc g++ libstdc++ bash
|
5 |
+
|
6 |
+
# Create a user and switch to it
|
7 |
+
RUN useradd -m -u 1000 user
|
8 |
+
USER user
|
9 |
+
|
10 |
+
WORKDIR /app
|
11 |
+
|
12 |
+
# Copy requirements and install them
|
13 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
14 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
+
|
16 |
+
# Install additional dependencies
|
17 |
+
RUN pip install git+https://github.com/tatsy/torchmcubes.git
|
18 |
+
|
19 |
+
# Expose the default Streamlit port
|
20 |
+
EXPOSE 7860
|
21 |
+
|
22 |
+
# Command to run the Streamlit app
|
23 |
+
CMD ["streamlit", "run", "app.py", "--server.headless", "true", "--server.enableCORS", "false", "--server.port", "7860", "--server.address", "0.0.0.0"]
|
|
|
|
|
|