Spaces:
Sleeping
Sleeping
Zwea Htet
commited on
Commit
•
5c95fc1
1
Parent(s):
1f57dce
set up docker image
Browse files- Dockerfile +30 -0
- README.md +3 -2
Dockerfile
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
WORKDIR /docker
|
4 |
+
|
5 |
+
ADD . /docker
|
6 |
+
|
7 |
+
COPY requirements.txt requirements.txt
|
8 |
+
RUN pip install --upgrade pip
|
9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
+
|
11 |
+
COPY . .
|
12 |
+
|
13 |
+
# Set up a new user named "user" with user ID 1000
|
14 |
+
RUN useradd -m -u 1000 user
|
15 |
+
|
16 |
+
# Switch to the "user" user
|
17 |
+
USER user
|
18 |
+
|
19 |
+
# Set home to the user's home directory
|
20 |
+
ENV HOME=/home/user \
|
21 |
+
PATH=/home/user/.local/bin:$PATH
|
22 |
+
|
23 |
+
# Set the working directory to the user's home directory
|
24 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
+
# Set the working directory to the user's home directory
|
27 |
+
COPY --chown=user . $HOME/app
|
28 |
+
|
29 |
+
CMD [ "gunicorn" , "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
30 |
+
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
@@ -3,8 +3,9 @@ title: RegBotBeta
|
|
3 |
emoji: 😻
|
4 |
colorFrom: green
|
5 |
colorTo: red
|
6 |
-
sdk: streamlit
|
7 |
-
sdk_version: 1.24.0
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
3 |
emoji: 😻
|
4 |
colorFrom: green
|
5 |
colorTo: red
|
6 |
+
# sdk: streamlit
|
7 |
+
# sdk_version: 1.24.0 not supported on huggingface spaces
|
8 |
+
sdk: docker
|
9 |
app_file: app.py
|
10 |
pinned: false
|
11 |
---
|