Skip to content

Commit

Permalink
fix docker issues (#235)
Browse files Browse the repository at this point in the history
* fix docker issues

* update poetry version in pre-commit, fix echo
  • Loading branch information
bokelley authored Oct 16, 2024
1 parent f1717fd commit 2717dfd
Show file tree
Hide file tree
Showing 4 changed files with 758 additions and 767 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ repos:
types: [python]

- repo: https://github.com/python-poetry/poetry
rev: "1.4.0"
rev: "1.8.4"
hooks:
- id: poetry-check
- id: poetry-lock
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Use the official lightweight Python image.
FROM python:3.10
# Allow statements and log
ENV PYTHONUNBUFFERED True
ENV PYTHONUNBUFFERED=True

RUN mkdir /app
WORKDIR /app
COPY . ./
COPY pyproject.toml /app

ENV PYTHONPATH=${PYTHONPATH}:${PWD}
ENV PYTHONPATH=/app
RUN pip install -r requirements.txt

RUN python "./scope3_methodology/cli/compute_defaults.py"
ENV ATP_DEFAULTS_FILE /app/defaults/atp-defaults.yaml
ENV ORGANIZATION_DEFAULTS_FILE /app/defaults/organization-defaults.yaml
ENV PROPERTY_DEFAULTS_FILE /app/defaults/property-defaults.yaml
ENV END_USER_DEVICE_DEFAULTS_FILE /app/defaults/end_user_device-defaults.yaml
ENV NETWORKING_DEFAULTS_FILE /app/defaults/networking-defaults.yaml
ENV TRANSMISSION_RATE_FILE /app/defaults/transmission_rate-defaults.yaml
ENV DOCS_DEFAULTS_FILE /app/defaults/docs-defaults.yaml
ENV ATP_DEFAULTS_FILE=/app/defaults/atp-defaults.yaml
ENV ORGANIZATION_DEFAULTS_FILE=/app/defaults/organization-defaults.yaml
ENV PROPERTY_DEFAULTS_FILE=/app/defaults/property-defaults.yaml
ENV END_USER_DEVICE_DEFAULTS_FILE=/app/defaults/end_user_device-defaults.yaml
ENV NETWORKING_DEFAULTS_FILE=/app/defaults/networking-defaults.yaml
ENV TRANSMISSION_RATE_FILE=/app/defaults/transmission_rate-defaults.yaml
ENV DOCS_DEFAULTS_FILE=/app/defaults/docs-defaults.yaml

CMD ["python", "scope3_methodology/api/api.py"]
Loading

0 comments on commit 2717dfd

Please sign in to comment.