Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cocalibration Demonstrator Backend
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
M4D
Cocalibration Demonstrator Backend
Commits
c0431f55
Commit
c0431f55
authored
1 year ago
by
Maximilian Gruber
Browse files
Options
Downloads
Patches
Plain Diff
add docker compose and adjust dockerfile
parent
07e79c90
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+15
-1
15 additions, 1 deletion
Dockerfile
app/testing.py
+1
-1
1 addition, 1 deletion
app/testing.py
docker-compose.yml
+14
-0
14 additions, 0 deletions
docker-compose.yml
requirements.txt
+1
-0
1 addition, 0 deletions
requirements.txt
with
31 additions
and
2 deletions
Dockerfile
+
15
−
1
View file @
c0431f55
FROM
python:3.9
FROM
python:slim-bookworm
# install git and audio stuff
RUN
apt-get update
RUN
apt-get
install
-y
--no-install-recommends
git
RUN
apt-get
install
-y
--no-install-recommends
alsa-utils
RUN
apt-get
install
-y
--no-install-recommends
libportaudio2
RUN
apt-get
install
-y
--no-install-recommends
ffmpeg
RUN
rm
-rf
/var/lib/apt/lists/
*
WORKDIR
/code
# setup python
COPY
./requirements.txt /code/requirements.txt
RUN
pip
install
--no-cache-dir
--upgrade
-r
/code/requirements.txt
# copy app source code and git-context
COPY
./app /code/app
COPY
./.git /code/.git
# start app
CMD
["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
This diff is collapsed.
Click to expand it.
app/testing.py
+
1
−
1
View file @
c0431f55
...
...
@@ -10,7 +10,7 @@ class session:
cocal_session
=
session
()
cocal
=
cocal_methods
.
CocalMethods
(
cocal_session
,
generate_plots
=
Fals
e
)
cocal
=
cocal_methods
.
CocalMethods
(
cocal_session
,
generate_plots
=
Tru
e
)
#cocal.record_and_save_reference(35)
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
14
−
0
View file @
c0431f55
services
:
backend
:
build
:
dockerfile
:
Dockerfile
args
:
HTTPS_PROXY
:
${HTTPS_PROXY}
HTTP_PROXY
:
${HTTP_PROXY}
http_proxy
:
${HTTP_PROXY}
https_proxy
:
${HTTPS_PROXY}
image
:
cocal_backend
devices
:
-
"
/dev/tty:/dev/tty"
# needs adaption to RaspberryPi
ports
:
-
8000:80
This diff is collapsed.
Click to expand it.
requirements.txt
+
1
−
0
View file @
c0431f55
fastapi
[all]
gitpython
gunicorn
lxml
multipart
numpy
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment