Spaces:
Build error
Build error
Pietro Lesci
commited on
Commit
•
fca717d
1
Parent(s):
49085cc
dockerize app
Browse files- Dockerfile +1 -13
- Makefile +4 -1
- README.md +1 -1
Dockerfile
CHANGED
@@ -1,20 +1,8 @@
|
|
1 |
-
# FROM continuumio/miniconda3:4.10.3-alpine
|
2 |
FROM python:3.7
|
3 |
|
4 |
-
# RUN apt-get -y update && apt-get -y install build-essential
|
5 |
-
# RUN conda update -n base -c defaults conda
|
6 |
-
# RUN conda install --force-reinstall -y -q --name base pip
|
7 |
-
|
8 |
-
# chown changes owner from root owner (1000) to the first user inside the env (100)
|
9 |
-
# COPY --chown=1000:100 requirements.txt /opt/requirements.txt
|
10 |
-
# COPY . .
|
11 |
-
# # RUN conda install --force-reinstall -y -q --name base -c conda-forge --file requirements.txt
|
12 |
-
# # RUN conda install --force-reinstall -y -q --name base pip
|
13 |
-
# RUN pip install -r requirements.txt
|
14 |
-
# CMD streamlit run ./app.py
|
15 |
-
|
16 |
COPY . /var/app/
|
17 |
WORKDIR /var/app
|
18 |
RUN pip install --upgrade pip
|
|
|
19 |
RUN pip install -r requirements.txt
|
20 |
CMD streamlit run ./app.py
|
|
|
|
|
1 |
FROM python:3.7
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
COPY . /var/app/
|
4 |
WORKDIR /var/app
|
5 |
RUN pip install --upgrade pip
|
6 |
+
RUN pip install streamlit==1.0
|
7 |
RUN pip install -r requirements.txt
|
8 |
CMD streamlit run ./app.py
|
Makefile
CHANGED
@@ -18,4 +18,7 @@ build: ## build the latest image for a project
|
|
18 |
## Deployment
|
19 |
########################################################
|
20 |
run:
|
21 |
-
docker run -d --name $(PROJECT)-${BUILD_TAG}-container -it --rm -p
|
|
|
|
|
|
|
|
18 |
## Deployment
|
19 |
########################################################
|
20 |
run:
|
21 |
+
docker run -d --name $(PROJECT)-${BUILD_TAG}-container -it --rm -p 4321:8501 $(PROJECT):${BUILD_TAG}
|
22 |
+
|
23 |
+
stop:
|
24 |
+
docker stop $(PROJECT)-${BUILD_TAG}-container
|
README.md
CHANGED
@@ -12,4 +12,4 @@ pinned: false
|
|
12 |
# To run locally in Docker
|
13 |
1. Clone this repo
|
14 |
1. run `make build` to create image
|
15 |
-
1. run `make run` to run container and serve the app at localhost:
|
|
|
12 |
# To run locally in Docker
|
13 |
1. Clone this repo
|
14 |
1. run `make build` to create image
|
15 |
+
1. run `make run` to run container and serve the app at localhost:4321
|