-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Use an official Python image with version 3.6+ | ||
FROM python:3.10-slim | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy the application code into the container | ||
COPY . /app | ||
|
||
# Install required dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
fontconfig \ | ||
fonts-dejavu-core \ | ||
x11-apps \ | ||
libx11-6 \ | ||
libxext6 \ | ||
libsm6 \ | ||
libxrender1 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN pip install --no-cache-dir numpy==1.26.4 scipy==1.13.1 osqp==0.6.7 pygame==2.6.1 | ||
|
||
# Expose any required ports (if needed by pygame or other services) | ||
EXPOSE 8000 | ||
|
||
# Set the default command to run the demo | ||
CMD ["python3", "demo.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3.8" | ||
services: | ||
cbf_qp_playground: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: cbf_qp_playground | ||
ports: | ||
- "8000:8000" # Adjust if any other port mapping is necessary | ||
volumes: | ||
- .:/app | ||
- /tmp/.X11-unix:/tmp/.X11-unix # Share the X11 socket for GUI rendering | ||
environment: | ||
- DISPLAY=${DISPLAY} # Pass the host's display to the container | ||
- SDL_VIDEODRIVER=x11 # Use X11 for PyGame | ||
stdin_open: true | ||
tty: true |