OpenEnv / Dockerfile
krishnachoudhary-hclguvi
Fix ModuleNotFoundError by running app as a module and adding __init__.py
497f9a7 unverified
raw
history blame contribute delete
367 Bytes
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user:user . $HOME/app
RUN pip install --no-cache-dir -r requirements.txt uv
RUN uv sync --no-install-project
EXPOSE 7860
CMD ["python", "-m", "server.app"]