Jai Shankar K S commited on
Commit
2859124
·
unverified ·
1 Parent(s): 23e80d7

build fix

Browse files
docker-compose.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ shop-sku-manager:
3
+ image: ghcr.io/meta-pytorch/openenv-base:latest
4
+ ports:
5
+ - "8001:8000"
6
+ volumes:
7
+ - ./envs:/app/envs
8
+ working_dir: /app/envs
9
+ environment:
10
+ - SHOP_DIFFICULTY=easy
11
+ - PYTHONPATH=/app/envs
12
+ command: >
13
+ sh -c "apt-get update > /dev/null 2>&1 && apt-get install -y --no-install-recommends git > /dev/null 2>&1 &&
14
+ pip install numpy 'openenv-core @ git+https://github.com/meta-pytorch/OpenEnv.git' --quiet &&
15
+ uvicorn shop_sku_manager.server.app:app --host 0.0.0.0 --port 8000 --reload"
16
+ healthcheck:
17
+ test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
18
+ interval: 30s
19
+ timeout: 3s
20
+ retries: 3
envs/shop_sku_manager/server/Dockerfile CHANGED
@@ -13,6 +13,8 @@ COPY . /app/env
13
 
14
  WORKDIR /app/env
15
 
 
 
16
  RUN if ! command -v uv >/dev/null 2>&1; then \
17
  curl -LsSf https://astral.sh/uv/install.sh | sh && \
18
  mv /root/.local/bin/uv /usr/local/bin/uv && \
@@ -42,10 +44,10 @@ COPY --from=builder /app/env/.venv /app/.venv
42
  COPY --from=builder /app/env /app/env
43
 
44
  ENV PATH="/app/.venv/bin:$PATH"
45
- ENV PYTHONPATH="/app/env:$PYTHONPATH"
46
  ENV SHOP_DIFFICULTY="easy"
47
 
48
  HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
49
  CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
50
 
51
- CMD ["sh", "-c", "cd /app/env && uvicorn server.app:app --host 0.0.0.0 --port 8000"]
 
13
 
14
  WORKDIR /app/env
15
 
16
+ RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
17
+
18
  RUN if ! command -v uv >/dev/null 2>&1; then \
19
  curl -LsSf https://astral.sh/uv/install.sh | sh && \
20
  mv /root/.local/bin/uv /usr/local/bin/uv && \
 
44
  COPY --from=builder /app/env /app/env
45
 
46
  ENV PATH="/app/.venv/bin:$PATH"
47
+ ENV PYTHONPATH="/app/env/envs:/app/env:$PYTHONPATH"
48
  ENV SHOP_DIFFICULTY="easy"
49
 
50
  HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
51
  CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
52
 
53
+ CMD ["sh", "-c", "cd /app/env/envs && uvicorn shop_sku_manager.server.app:app --host 0.0.0.0 --port 8000"]