Spaces:
Runtime error
Runtime error
Simplify Dockerfile. Just testing streamlit now
Browse files- Dockerfile +20 -5
- app.py +0 -2
Dockerfile
CHANGED
@@ -1,13 +1,28 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
USER $APPUSER
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
COPY --chown=$APPUSER:appgroup . /
|
6 |
|
7 |
-
WORKDIR /
|
8 |
|
9 |
# Expose port for streamlit
|
10 |
EXPOSE 8501
|
11 |
|
12 |
# Run streamlit app under conda environment
|
13 |
-
CMD ["sh", "-c", "
|
|
|
1 |
+
FROM nvidia/cuda:11.7.1-devel-ubuntu22.04
|
2 |
+
|
3 |
+
RUN apt-get update -y
|
4 |
+
RUN apt-get install -y sudo wget curl nano git \
|
5 |
+
python3 python3-pip && rm -rf /var/lib/apt/lists/*
|
6 |
+
|
7 |
+
# Create a group and user
|
8 |
+
ENV APPUSER="appuser"
|
9 |
+
ENV HOME=/home/$APPUSER
|
10 |
+
RUN groupadd -g 999 appgroup && \
|
11 |
+
useradd -r -u 999 -g appgroup $APPUSER
|
12 |
+
|
13 |
USER $APPUSER
|
14 |
+
WORKDIR $HOME
|
15 |
+
|
16 |
+
RUN pip install --user streamlit==1.28
|
17 |
+
|
18 |
+
ENV PATH="$HOME/.local/bin:$PATH"
|
19 |
|
20 |
+
COPY --chown=$APPUSER:appgroup . $HOME/app
|
21 |
|
22 |
+
WORKDIR $HOME/app
|
23 |
|
24 |
# Expose port for streamlit
|
25 |
EXPOSE 8501
|
26 |
|
27 |
# Run streamlit app under conda environment
|
28 |
+
CMD ["sh", "-c", "streamlit run app.py"]
|
app.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
import torch
|
2 |
-
|
3 |
import streamlit as st
|
4 |
|
5 |
# Create the Streamlit app
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
# Create the Streamlit app
|