Move machine.py and neopixel.py into a tracked /lib/ at the repo root and auto-copy them into WORKSPACE_ROOT/lib whenever files are missing, so empty volumes and fresh per-user workspaces always have the read-only stubs available to Jedi and Pyodide. Allow all users to browse lib/ in the UI (writes still gated by the API), and add tests covering initial seeding and re-population after the dir is wiped. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
381 B
Docker
21 lines
381 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
WORKDIR /app
|
|
|
|
RUN pip install --no-cache-dir pipenv
|
|
|
|
COPY Pipfile Pipfile.lock ./
|
|
RUN pipenv install --system --deploy
|
|
|
|
COPY src ./src
|
|
COPY lib ./lib
|
|
COPY workspace ./workspace
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["uvicorn", "app:app", "--app-dir", "src", "--host", "0.0.0.0", "--port", "8080"]
|