hirann commited on
Commit
1422016
·
verified ·
1 Parent(s): 74d1d82

Upload server/Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. server/Dockerfile +17 -0
server/Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG BASE_IMAGE=ghcr.io/meta-pytorch/openenv-base:latest
2
+ FROM ${BASE_IMAGE} AS builder
3
+ WORKDIR /app
4
+ COPY . /app/env
5
+ WORKDIR /app/env
6
+ RUN if ! command -v uv > /dev/null 2>&1; then curl -LsSf https://astral.sh/uv/install.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv; fi
7
+ RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
8
+ RUN uv sync --no-install-project --no-editable
9
+ RUN uv sync --no-editable
10
+ FROM ${BASE_IMAGE}
11
+ WORKDIR /app
12
+ COPY --from=builder /app/env/.venv /app/.venv
13
+ COPY --from=builder /app/env /app/env
14
+ ENV PATH="/app/.venv/bin:$PATH"
15
+ ENV PYTHONPATH="/app/env:$PYTHONPATH"
16
+ EXPOSE 8000
17
+ CMD ["sh", "-c", "cd /app/env && uvicorn overview_env.server.app:app --host 0.0.0.0 --port 8000"]