fix Dockerfile
Browse files- Dockerfile +8 -10
- README.md +1 -1
Dockerfile
CHANGED
@@ -1,25 +1,23 @@
|
|
1 |
-
FROM
|
2 |
ENV DEBIAN_FRONTEND=noninteractive
|
3 |
|
|
|
|
|
|
|
4 |
RUN apt-get update && \
|
5 |
apt-get install -y --no-install-recommends \
|
6 |
-
wget \
|
7 |
git \
|
8 |
stockfish \
|
9 |
make \
|
10 |
-
python3 \
|
11 |
-
python3-distutils \
|
12 |
-
python3-pip && \
|
13 |
rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
-
COPY requirements.txt
|
16 |
-
RUN
|
17 |
-
RUN python3 -m pip install --no-cache-dir -r /app/requirements.txt
|
18 |
|
19 |
RUN git clone https://github.com/lichess-org/chess-openings.git /app/data/lichess_openings && \
|
20 |
cd /app/data/lichess_openings && \
|
21 |
make
|
22 |
|
23 |
-
COPY . /app
|
24 |
WORKDIR /app
|
25 |
-
CMD ["
|
|
|
1 |
+
FROM python:3.12-slim
|
2 |
ENV DEBIAN_FRONTEND=noninteractive
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
RUN apt-get update && \
|
8 |
apt-get install -y --no-install-recommends \
|
|
|
9 |
git \
|
10 |
stockfish \
|
11 |
make \
|
|
|
|
|
|
|
12 |
rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
15 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
16 |
|
17 |
RUN git clone https://github.com/lichess-org/chess-openings.git /app/data/lichess_openings && \
|
18 |
cd /app/data/lichess_openings && \
|
19 |
make
|
20 |
|
21 |
+
COPY --chown=user . /app
|
22 |
WORKDIR /app
|
23 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title: Chess Agent
|
3 |
emoji: ♟️
|
4 |
colorFrom: yellow
|
5 |
colorTo: green
|
|
|
1 |
---
|
2 |
+
title: Chess Agent MCP
|
3 |
emoji: ♟️
|
4 |
colorFrom: yellow
|
5 |
colorTo: green
|