chore: Add docker file
Browse files- Dockerfile +21 -0
- python/othello/__init__.py +2 -2
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM docker.io/library/python:3.11-slim-bullseye
|
2 |
+
|
3 |
+
RUN apt-get update
|
4 |
+
|
5 |
+
RUN useradd -m -u 1000 user
|
6 |
+
USER user
|
7 |
+
WORKDIR /home/user/app
|
8 |
+
|
9 |
+
RUN pip install --user --upgrade pip
|
10 |
+
RUN pip install --user --no-cache python-fasthtml
|
11 |
+
|
12 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
13 |
+
|
14 |
+
COPY --chown=user target/wheels/othello-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl .
|
15 |
+
RUN pip install --user othello-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
|
16 |
+
# COPY --chown=user python/othello/__init__.py ./othello/__init__.py
|
17 |
+
# COPY --chown=user python/othello/ui.py ./othello/ui.py
|
18 |
+
|
19 |
+
ENTRYPOINT ["othello-ui"]
|
20 |
+
# ENTRYPOINT ["uvicorn"]
|
21 |
+
# CMD ["pkg.ui:create_app", "--host", "0.0.0.0", "--port", "8000", "--factory"]%
|
python/othello/__init__.py
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
from othello._othello import Game, AlphaBetaBot
|
2 |
|
3 |
-
__all__ = ["Game", "AlphaBetaBot"]
|
|
|
1 |
+
from othello._othello import Game, AlphaBetaBot, BitBoard, State
|
2 |
|
3 |
+
__all__ = ["Game", "AlphaBetaBot", "BitBoard", "State"]
|