Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +9 -12
Dockerfile
CHANGED
@@ -1,21 +1,18 @@
|
|
1 |
|
2 |
######################## WRITE YOUR DOCKERFILE SCRIPT HERE #########################
|
3 |
# Use official Python image
|
4 |
-
FROM python:3.
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
ENV
|
9 |
|
10 |
-
# Set working directory
|
11 |
WORKDIR /app
|
12 |
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
RUN pip install --upgrade pip
|
18 |
-
RUN pip install -r requirements.txt
|
19 |
|
20 |
-
#
|
21 |
-
CMD ["streamlit", "run", "app.py", "--
|
|
|
1 |
|
2 |
######################## WRITE YOUR DOCKERFILE SCRIPT HERE #########################
|
3 |
# Use official Python image
|
4 |
+
FROM python:3.9
|
5 |
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
USER user
|
8 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
|
12 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
13 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
|
15 |
+
COPY --chown=user . /app
|
|
|
|
|
16 |
|
17 |
+
# Start the Streamlit app on port 7860, the default port expected by Spaces
|
18 |
+
CMD ["streamlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|