Spaces:
Running
Running
Bram Vanroy
commited on
Commit
β’
4d828b8
1
Parent(s):
b818293
use docker
Browse files- Dockerfile +23 -0
- README.md +1 -2
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10.7
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
COPY ./requirements.txt /app/requirements.txt
|
6 |
+
COPY ./packages.txt /app/packages.txt
|
7 |
+
|
8 |
+
RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
9 |
+
RUN pip3 install --no-cache-dir -r /app/requirements.txt
|
10 |
+
|
11 |
+
# User
|
12 |
+
RUN useradd -m -u 1000 user
|
13 |
+
USER user
|
14 |
+
ENV HOME /home/user
|
15 |
+
ENV PATH $HOME/.local/bin:$PATH
|
16 |
+
|
17 |
+
WORKDIR $HOME
|
18 |
+
RUN mkdir app
|
19 |
+
WORKDIR $HOME/app
|
20 |
+
COPY . $HOME/app
|
21 |
+
|
22 |
+
EXPOSE 8501
|
23 |
+
CMD streamlit run app.py
|
README.md
CHANGED
@@ -3,8 +3,7 @@ title: Text To AMR
|
|
3 |
emoji: π©βπ»
|
4 |
colorFrom: green
|
5 |
colorTo: gray
|
6 |
-
sdk:
|
7 |
-
sdk_version: 1.17.0
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
license: gpl-3.0
|
|
|
3 |
emoji: π©βπ»
|
4 |
colorFrom: green
|
5 |
colorTo: gray
|
6 |
+
sdk: docker
|
|
|
7 |
app_file: app.py
|
8 |
pinned: true
|
9 |
license: gpl-3.0
|