Spaces:
Runtime error
Runtime error
chore: updating dockerfiles and hgf config
Browse files- .dockerignore +6 -1
- Dockerfile +5 -7
- Dockerfile-Base +1 -4
- Dockerfile-Light +3 -4
- README.md +1 -0
- entrypoint.sh +1 -1
.dockerignore
CHANGED
|
@@ -1 +1,6 @@
|
|
| 1 |
-
# ignore memory folder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ignore memory folder
|
| 2 |
+
Compose.yaml
|
| 3 |
+
Dockerfile-Base
|
| 4 |
+
Dockerfile-Light
|
| 5 |
+
entrypoint.sh
|
| 6 |
+
railway.json
|
Dockerfile
CHANGED
|
@@ -6,19 +6,17 @@ FROM python:3.11.6
|
|
| 6 |
## build based on python with dependencies (quicker)
|
| 7 |
# FROM thesis:0.1.6-base
|
| 8 |
|
| 9 |
-
WORKDIR /webapp
|
| 10 |
-
|
| 11 |
# install dependencies and copy files
|
| 12 |
-
COPY
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
RUN pip install fastapi uvicorn
|
| 15 |
-
COPY
|
| 16 |
|
| 17 |
-
RUN ls --recursive
|
| 18 |
|
| 19 |
# setting config and run command
|
| 20 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "
|
| 21 |
|
| 22 |
# build and run commands
|
| 23 |
## docker build -t thesis:0.1.6 -f Dockerfile-Light .
|
| 24 |
-
## docker run -d --name thesis -p
|
|
|
|
| 6 |
## build based on python with dependencies (quicker)
|
| 7 |
# FROM thesis:0.1.6-base
|
| 8 |
|
|
|
|
|
|
|
| 9 |
# install dependencies and copy files
|
| 10 |
+
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 12 |
RUN pip install fastapi uvicorn
|
| 13 |
+
COPY . .
|
| 14 |
|
| 15 |
+
RUN ls --recursive .
|
| 16 |
|
| 17 |
# setting config and run command
|
| 18 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
| 19 |
|
| 20 |
# build and run commands
|
| 21 |
## docker build -t thesis:0.1.6 -f Dockerfile-Light .
|
| 22 |
+
## docker run -d --name thesis -p 8080:8080 thesis:0.1.6-small
|
Dockerfile-Base
CHANGED
|
@@ -3,11 +3,8 @@
|
|
| 3 |
# using newest python as a base image
|
| 4 |
FROM python:3.11.6
|
| 5 |
|
| 6 |
-
# setting workdir
|
| 7 |
-
WORKDIR ./
|
| 8 |
-
|
| 9 |
# install dependencies based on requirements
|
| 10 |
-
COPY
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 12 |
|
| 13 |
# build and run commands
|
|
|
|
| 3 |
# using newest python as a base image
|
| 4 |
FROM python:3.11.6
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
# install dependencies based on requirements
|
| 7 |
+
COPY requirements.txt ./
|
| 8 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 9 |
|
| 10 |
# build and run commands
|
Dockerfile-Light
CHANGED
|
@@ -4,12 +4,11 @@
|
|
| 4 |
FROM python:3.11.6
|
| 5 |
|
| 6 |
#set working directory and copying files, endpoint script
|
| 7 |
-
|
| 8 |
-
COPY
|
| 9 |
-
COPY /entrypoint.sh ./
|
| 10 |
|
| 11 |
# show files in directory
|
| 12 |
-
RUN ls --recursive
|
| 13 |
|
| 14 |
# setting config and run command
|
| 15 |
RUN chmod +x ./entrypoint.sh
|
|
|
|
| 4 |
FROM python:3.11.6
|
| 5 |
|
| 6 |
#set working directory and copying files, endpoint script
|
| 7 |
+
COPY . .
|
| 8 |
+
COPY entrypoint.sh .
|
|
|
|
| 9 |
|
| 10 |
# show files in directory
|
| 11 |
+
RUN ls --recursive .
|
| 12 |
|
| 13 |
# setting config and run command
|
| 14 |
RUN chmod +x ./entrypoint.sh
|
README.md
CHANGED
|
@@ -8,6 +8,7 @@ sdk_version: 4.7.1
|
|
| 8 |
app_file: main.py
|
| 9 |
pinned: true
|
| 10 |
license: mit
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# Bachelor Thesis
|
|
|
|
| 8 |
app_file: main.py
|
| 9 |
pinned: true
|
| 10 |
license: mit
|
| 11 |
+
app_port: 8080
|
| 12 |
---
|
| 13 |
|
| 14 |
# Bachelor Thesis
|
entrypoint.sh
CHANGED
|
@@ -4,4 +4,4 @@
|
|
| 4 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 5 |
|
| 6 |
# running the fastapi app
|
| 7 |
-
uvicorn main:app --host 0.0.0.0 --port
|
|
|
|
| 4 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 5 |
|
| 6 |
# running the fastapi app
|
| 7 |
+
uvicorn main:app --host 0.0.0.0 --port 8080
|