Commit Graph

9 Commits

Author SHA1 Message Date
5fe58ab5bd Devcontainer: Optimize apt-get commands to reduce Docker image size (#152882)
## Summary
- Added --no-install-recommends flag to all apt-get install commands to reduce unnecessary dependencies
- Added apt-get clean after package installations to remove package cache and reduce image size
- Combined multiple apt commands into single instructions to reduce Docker image layers

## Test plan
Test by building the devcontainer and verifying functionality while ensuring reduced image size
Pull Request resolved: https://github.com/pytorch/pytorch/pull/152882
Approved by: https://github.com/cyyever, https://github.com/atalman, https://github.com/Skylion007
2025-05-06 20:33:02 +00:00
1f4f4a61c2 Devcontainer: Replace conda with apt-based setup (#152881)
## Summary
- Replaced miniconda base image with base Ubuntu 22.04 image
- Installed Python and required dependencies using apt
- Replaced conda-based CUDA installation with apt-based version
- Updated paths in install-dev-tools.sh to reflect the new non-conda environment
- Removed conda-specific files and added requirements.txt for Python dependencies

## Test plan
Test by building and running the devcontainer in VS Code with both CPU and CUDA configurations
Pull Request resolved: https://github.com/pytorch/pytorch/pull/152881
Approved by: https://github.com/atalman
2025-05-06 19:23:58 +00:00
200df50c05 Devcontainer: Fix context path and workspace mount (#152880)
## Summary
- Changed the devcontainer context path from '../..' to './' for both CPU and CUDA configurations
- Added workspace mount configuration to properly mount the repository in the container
- Added containerEnv to disable implicit --user pip flag

## Test plan
Test by building and running the devcontainer in VS Code
Pull Request resolved: https://github.com/pytorch/pytorch/pull/152880
Approved by: https://github.com/atalman
2025-05-06 19:22:29 +00:00
42a4df9447 Support CUDA nightly package in tools/nightly.py (#131133)
Add a new option `--cuda` to `tools/nightly.py` to pull the nightly packages with CUDA support.

```bash
# installs pytorch-nightly with cpuonly
tools/nightly.py pull

# The following only available on Linux and Windows
# installs pytorch-nightly with latest CUDA we support
tools/nightly.py pull --cuda

# installs pytorch-nightly with CUDA 12.1
tools/nightly.py pull --cuda 12.1
```

Also add targets in `Makefile` and instructions in constribution guidelines.

```bash
# setup conda environment with pytorch-nightly
make setup-env

# setup conda environment with pytorch-nightly with CUDA support
make setup-env-cuda
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/131133
Approved by: https://github.com/ezyang
2024-07-25 05:33:52 +00:00
3cf02c5e06 [Dev Container] Fix container build by preventing conda prompt (#121128)
Without this the build will freeze with prompt:
  Proceed ([y]/n)?

I'm using rootless podman in vscode instead of docker but I think it should not affect this.
..or does conda somehow detect Docker but not Podman? Anyway, this should not break anything.

Btw, I also had to uncomment the line: "remoteUser": "root" in devcontainer.json to finish the post installation properly but I guess there might be other workarounds - and perhaps you don't want to run as root if your container has root privileges.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121128
Approved by: https://github.com/drisspg
2024-03-06 20:50:40 +00:00
311cc564f6 Fix README Typo (#120892)
Fixes a README typo so that the prompt is consistent with VSCode 1.87.0.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/120892
Approved by: https://github.com/albanD, https://github.com/drisspg
2024-03-05 09:05:21 +00:00
296f015f42 [Dev Container]Add readme for devcontainer (#108848)
Following the PR https://github.com/pytorch/pytorch/pull/108766 , add a README to guide users through the usage of devcontainers.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/108848
Approved by: https://github.com/drisspg
2023-09-08 21:03:27 +00:00
96d269eab1 [Dev Container][CUDA]Fix linker path (#108766)
Building with CUDA in dev container leads to error: `cannot find -lcudart_static`. This is because the libraries are under a custom CUDA_HOME, and `ld` cannot find it.

Updating the `LDFLAGS` environment variable works.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108766
Approved by: https://github.com/drisspg
2023-09-07 21:32:39 +00:00
7378b6b9e3 Add devcontainer support to PyTorch Project (#98252)
# Summary
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 293ded1</samp>

This pull request adds support for using Visual Studio Code Remote - Containers extension with the pytorch project. It adds a `.devcontainer` folder with a `devcontainer.json` file, a `Dockerfile`, and a `noop.txt` file that configure and create a dev container with Anaconda and Python 3.

<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at d6b9cd7</samp>

> _`devcontainer.json`_
> _Configures PyTorch containers_
> _For CPU or GPU_

## Related to:
https://github.com/pytorch/pytorch/issues/92838

Pull Request resolved: https://github.com/pytorch/pytorch/pull/98252
Approved by: https://github.com/ZainRizvi
2023-05-30 19:44:18 +00:00